]> git.lyx.org Git - lyx.git/commitdiff
GuiView: Small simplification.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 13 Feb 2011 10:00:42 +0000 (10:00 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 13 Feb 2011 10:00:42 +0000 (10:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37629 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 8d514681430efcfd8fa72ca18e311b7a8b5fd441..37a8b94f1cb181143ac3eb2510028cf6bebd31ba 100644 (file)
@@ -3310,10 +3310,9 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                }
 
                case LFUN_DIALOG_TOGGLE: {
-                       if (isDialogVisible(cmd.getArg(0)))
-                               dispatch(FuncRequest(LFUN_DIALOG_HIDE, cmd.argument()), dr);
-                       else
-                               dispatch(FuncRequest(LFUN_DIALOG_SHOW, cmd.argument()), dr);
+                       FuncCode const func_code = isDialogVisible(cmd.getArg(0))
+                               ? LFUN_DIALOG_HIDE : LFUN_DIALOG_SHOW;
+                       dispatch(FuncRequest(func_code, cmd.argument()), dr);
                        break;
                }