]> git.lyx.org Git - features.git/commitdiff
Fix bug #5082: Outline visibility not remembered.
authorVincent van Ravesteijn <vfr@lyx.org>
Mon, 3 Jan 2011 23:23:09 +0000 (23:23 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Mon, 3 Jan 2011 23:23:09 +0000 (23:23 +0000)
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.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37094 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index aeee76829eddc610e29231580d1b81de5e766170..ebce023c7c42d2a32a2f2879153cae08e77d3fd0 100644 (file)
@@ -3823,9 +3823,12 @@ void GuiView::hideDialog(string const & name, Inset * inset)
        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())