]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #6964. Problem was that we always saw the first branch.
authorRichard Heck <rgheck@comcast.net>
Thu, 21 Oct 2010 18:20:12 +0000 (18:20 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 21 Oct 2010 18:20:12 +0000 (18:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35759 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index ac56b7598cc0d1c58caa5a9419db87e733e3f3b3..e24ec9703e35dd96559a88d88ed303672de90bea 100644 (file)
@@ -3135,21 +3135,21 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 
                case LFUN_DIALOG_UPDATE: {
                        string const name = to_utf8(cmd.argument());
-                       if (currentBufferView()) {
+                       if (name == "prefs" || name == "document")
+                               updateDialog(name, string());
+                       else if (name == "paragraph")
+                               lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE));
+                       else if (currentBufferView()) {
                                Inset * inset = currentBufferView()->editedInset(name);
                                // Can only update a dialog connected to an existing inset
-                               if (!inset)
-                                       break;
-                               // FIXME: get rid of this indirection; GuiView ask the inset
-                               // if he is kind enough to update itself...
-                               FuncRequest fr(LFUN_INSET_DIALOG_UPDATE, cmd.argument());
-                               //FIXME: pass DispatchResult here?
-                               inset->dispatch(currentBufferView()->cursor(), fr);
-                       } else if (name == "paragraph") {
-                               lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE));
-                       } else if (name == "prefs" || name == "document") {
-                               updateDialog(name, string());
-                       }
+                               if (inset) {
+                                       // FIXME: get rid of this indirection; GuiView ask the inset
+                                       // if he is kind enough to update itself...
+                                       FuncRequest fr(LFUN_INSET_DIALOG_UPDATE, cmd.argument());
+                                       //FIXME: pass DispatchResult here?
+                                       inset->dispatch(currentBufferView()->cursor(), fr);
+                               }
+                       } 
                        break;
                }