]> git.lyx.org Git - features.git/commitdiff
Fix bug #7308: Table settings dialog broken.
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 16 Feb 2011 23:09:29 +0000 (23:09 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 16 Feb 2011 23:09:29 +0000 (23:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37706 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiTabular.cpp
src/insets/InsetTabular.cpp

index 87f351b6117010c013340e87372761377dc51c21..8fe7961474b90d7094fefa61e54d0f95e1de124b 100644 (file)
@@ -408,7 +408,7 @@ void GuiTabular::setTableAlignment(string & param_str) const
 docstring GuiTabular::dialogToParams() const
 {
        // FIXME: We should use Tabular directly.
-       string param_str = "tabular";
+       string param_str = "tabular from-dialog";
 
        // table width
        string tabwidth = widgetsToLength(tabularWidthED, tabularWidthUnitLC);
index 2f0a111fee411a681237cfdbe2a9c657edaf5674..07fca2308209213f460f8fcb69f1b1db30a3f917 100644 (file)
@@ -4278,8 +4278,16 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                if (&cur.inset() != this || cmd.getArg(0) != "tabular") 
                        break;
 
-               string const s = cmd.getArg(1);
                // FIXME: We only check for the very first argument...
+               string const s = cmd.getArg(1);
+               // We always enable the lfun if it is coming from the dialog
+               // because the dialog makes sure all the settings are valid,
+               // even though the first argument might not be valid now.
+               if (s == "from-dialog") {
+                       status.setEnabled(true);
+                       return true;
+               }
+
                int action = Tabular::LAST_ACTION;
                int i = 0;
                for (; tabularFeature[i].action != Tabular::LAST_ACTION; ++i) {