Author: vfr
Date: Tue Jan  4 00:23:09 2011
New Revision: 37094
URL: http://www.lyx.org/trac/changeset/37094

Log:
Fix bug #5082: Outline visibility not remembered.

When a document with a InsetTOC was closed, the outline was closed. But this 
shouldn't happen because editedInset("toc") does never return something.

The reason that this happened was that if currentBufferView() is 0, we don't 
even care wehther inset was specified. If inset is specified, it should match 
the editedInset.

Modified:
   lyx-devel/trunk/src/frontends/qt4/GuiView.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp       Mon Jan  3 22:38:19 
2011        (r37093)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp       Tue Jan  4 00:23:09 
2011        (r37094)
@@ -3823,9 +3823,12 @@
        if (it == d.dialogs_.end())
                return;
 
-       if (inset && currentBufferView()
-               && inset != currentBufferView()->editedInset(name))
-               return;
+       if (inset) {
+               if (!currentBufferView())
+                       return;
+               if (inset != currentBufferView()->editedInset(name))
+                       return;
+       }
 
        Dialog * const dialog = it->second.get();
        if (dialog->isVisibleView())

Reply via email to