Author: vfr
Date: Mon Dec  5 13:40:22 2011
New Revision: 40376
URL: http://www.lyx.org/trac/changeset/40376

Log:
Fix bug #7755: Unknown tabular feature "from-dialog"

"from-dialog" is added to the LFUN_INSET_MODIFY function when it is issued from 
the table settings dialog. This is done to prevent the checking of the 
individual parameters, because it has to consider all parameters alltogether. 
Besides, when issued from the dialog it is already guaranteed that the 
parameters are valid.

This parameter should not be passed onto tabularfeatures.

Modified:
   lyx-devel/trunk/src/insets/InsetTabular.cpp

Modified: lyx-devel/trunk/src/insets/InsetTabular.cpp
==============================================================================
--- lyx-devel/trunk/src/insets/InsetTabular.cpp Mon Dec  5 13:29:24 2011        
(r40375)
+++ lyx-devel/trunk/src/insets/InsetTabular.cpp Mon Dec  5 13:40:22 2011        
(r40376)
@@ -4159,10 +4159,16 @@
                cur.bv().showDialog("tabular");
                break;
 
-       case LFUN_INSET_MODIFY:
-               if (!tabularFeatures(cur, to_utf8(cmd.argument())))
+       case LFUN_INSET_MODIFY: {
+               string arg;
+               if (cmd.getArg(1) == "from-dialog")
+                       arg = cmd.getArg(0) + 
to_utf8(cmd.argument().substr(19));
+               else
+                       arg = to_utf8(cmd.argument());
+               if (!tabularFeatures(cur, arg))
                        cur.undispatched();
                break;
+       }
 
        // insert file functions
        case LFUN_FILE_INSERT_PLAINTEXT_PARA:

Reply via email to