Skip to content

Commit

Permalink
Only remove RecursionCache when moving a node, instead of everytime t…
Browse files Browse the repository at this point in the history
…he Edit dialog is opened.

Better performance when re-opening the dialog if nothing changed.
  • Loading branch information
maforget committed Jun 5, 2024
1 parent 16e0fa5 commit f8cf2f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ComicRack/Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Community Edition Build 0.9.180:
* BUGFIX: Made getting a list of book from a folder a lot faster when there was incompatible files. The slowdown was related to attempting to read the files as a WebComic. Previously the program would attempt to use all it's known provider on each and every file until it found a working one, regardless of the type. Now Webcomics will NEED to be a CBW.
* BUGFIX: Enabling fullscreen didn't minimize the gui when reader was in it's own window, with option to do it at the same time enabled.
* BUGFIX: Fixed files not being deleted if they contained Unicode characters.
* BUGFIX: Increase performance (dragging, searching lists & opening edit smart lists dialog) when a lot of smart list existed.

^^^^^^^^^^ Community Edition ^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions ComicRack/Dialogs/SmartListDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ private void ShowNotes(bool show)
private void FillBaseCombo(ComicSmartListItem scl)
{
cbBaseList.Items.Clear();
RecursionCache.Items.Remove(EditId);
//RecursionCache.Items.Remove(EditId);

foreach (ComicListItem item in Library.ComicLists.GetItems<ComicListItem>())
foreach (ComicListItem item in Library.ComicLists.GetItems<ComicListItem>())
{
Guid guid = ((item is ComicLibraryListItem) ? Guid.Empty : item.Id);
if (!item.RecursionTest(EditId))
Expand Down
3 changes: 2 additions & 1 deletion ComicRack/Views/ComicListLibraryBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,8 @@ private void tvQueries_DragDrop(object sender, DragEventArgs e)
}
ComicListItemCollection comicListItemCollection = ((dragNode.Parent == null) ? Library.ComicLists : ((ComicListItemFolder)dragNode.Parent.Tag).Items);
ComicListItem comicListItem = dragNode.Tag as ComicListItem;
if (e.Effect == DragDropEffects.Copy && comicListItem is ShareableComicListItem)
RecursionCache.Items.Remove(comicListItem.Id);
if (e.Effect == DragDropEffects.Copy && comicListItem is ShareableComicListItem)
{
comicListItem = ((ICloneable)(ShareableComicListItem)comicListItem).Clone<ShareableComicListItem>();
}
Expand Down

0 comments on commit f8cf2f4

Please sign in to comment.