From: Jürgen Spitzmüller Date: Tue, 6 Sep 2011 06:42:18 +0000 (+0000) Subject: Fix Horizontal Space dialog when issued from within math (bug 7746). X-Git-Tag: 2.0.2~229 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4ee140bf5be41e22d24c092946591f8dc82fe36d;p=features.git Fix Horizontal Space dialog when issued from within math (bug 7746). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39615 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 1b4a0946a1..e3d2dc0e58 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -393,7 +393,7 @@ Menuset Item "Protected Space|P" "space-insert protected" Item "Interword Space|w" "space-insert normal" Item "Thin Space|T" "space-insert thin" - Item "Horizontal Space...|o" "dialog-show-new-inset space" + Item "Horizontal Space...|o" "command-alternatives dialog-show-new-inset space;dialog-show-new-inset mathspace" Item "Horizontal Line...|L" "dialog-show-new-inset line" Item "Vertical Space...|V" "dialog-show-new-inset vspace" Submenu "Phantom|m" "insert_phantom" diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index fd86d03989..92eb1a84fc 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -332,6 +332,11 @@ bool decodeInsetParam(string const & name, string & data, data = InsetGraphics::params2string(p, buffer); break; } + case MATH_SPACE_CODE: { + InsetSpaceParams p(true); + data = InsetSpace::params2string(p); + break; + } case NOTE_CODE: { InsetNoteParams p; data = InsetNote::params2string(p); diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 9dd01cca0c..0ec27507a4 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -1390,6 +1390,14 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd, break; } + case LFUN_DIALOG_SHOW_NEW_INSET: { + docstring const & name = cmd.argument(); + if (name == "space") + flag.setEnabled(false); + break; + } + + case LFUN_MATH_DELIM: case LFUN_MATH_BIGDELIM: // Don't do this with multi-cell selections diff --git a/status.20x b/status.20x index 977265583b..9b94f527e1 100644 --- a/status.20x +++ b/status.20x @@ -72,6 +72,8 @@ What's new - Repair broken outliner display for broken references (bug 7708). +- Fix Horizontal Space dialog when issued from within math (bug 7746). + - Mark buffer dirty when a label is changed, so the file can be saved and the change can be reverted (bug 7655).