do not reloadData on rename
authorNiki Roo <niki@nikiroo.be>
Sat, 25 Apr 2020 19:26:18 +0000 (21:26 +0200)
committerNiki Roo <niki@nikiroo.be>
Sat, 25 Apr 2020 19:26:18 +0000 (21:26 +0200)
src/be/nikiroo/fanfix_swing/gui/book/BookPopup.java

index 3110e00601d8d89366b6e3553261f49234399a68..d6499385a98e7b608a8739774f723b5774b5935c 100644 (file)
@@ -480,7 +480,9 @@ public class BookPopup extends JPopupMenu {
                                                                // simple fireElementChanged is not
                                                                // enough, we need to clear the whole cache (for
                                                                // BrowserPanel for instance)
-                                                               informer.invalidateCache();
+                                                               if (what != ChangeAction.TITLE) {
+                                                                       informer.invalidateCache();
+                                                               }
 
                                                                // But we ALSO fire those, because they appear
                                                                // before the whole refresh...
@@ -492,7 +494,7 @@ public class BookPopup extends JPopupMenu {
                                                                // Sources/Authors(/Tags?) list
 
                                                                // Even if problems occurred, still invalidate
-                                                               // the cache
+                                                               // the cache above
                                                                get();
                                                        } catch (Exception e) {
                                                                UiHelper.error(BookPopup.this.getParent(),