]> git.lyx.org Git - features.git/commitdiff
trivialities
authorAngus Leeming <leeming@lyx.org>
Tue, 4 Mar 2003 19:01:17 +0000 (19:01 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 4 Mar 2003 19:01:17 +0000 (19:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6342 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C

index 8bdb9e11ebcdbe27b1fb727c456be6ff753f0825..4051ba8c92fb64828a0a023eb2966419242bd3d6 100644 (file)
@@ -796,12 +796,17 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
 
        case LFUN_DIALOG_SHOW_NEW_INSET: {
                string const & name = argument;
+               string data;
                if (name == "ref") {
-                       RefInset tmp;
-                       string const data = tmp.createDialogStr(name);
-                       bv->owner()->getDialogs().show(name, data, 0);
-               } else
+                       RefInset tmp(name);
+                       data = tmp.createDialogStr(name);
+               }
+
+               if (data.empty())
                        result = UNDISPATCHED;
+               else {
+                       bv->owner()->getDialogs().show(name, data, 0);
+               }
        }
        break;