]> git.lyx.org Git - features.git/commitdiff
Fix #7021: the problem was that activating the border combo was triggering dialogToPa...
authorAbdelrazak Younes <younes@lyx.org>
Sat, 4 Dec 2010 10:55:03 +0000 (10:55 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 4 Dec 2010 10:55:03 +0000 (10:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36712 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiTabular.cpp
src/frontends/qt4/GuiTabular.h

index 8ffa2f3146aa16c873521a62a981bf2aa4faf674..a2dec894bb9c51ab19016b592622bdd4db6bf721 100644 (file)
@@ -64,20 +64,14 @@ GuiTabular::GuiTabular(QWidget * parent)
                this, SLOT(checkEnabled()));
        connect(topspaceUnitCB, SIGNAL(selectionChanged(lyx::Length::UNIT)),
                this, SLOT(checkEnabled()));
-       connect(topspaceCO, SIGNAL(activated(int)),
-               this, SLOT(checkEnabled()));
        connect(bottomspaceED, SIGNAL(editingFinished()),
                this, SLOT(checkEnabled()));
        connect(bottomspaceUnitCB, SIGNAL(selectionChanged(lyx::Length::UNIT)),
                this, SLOT(checkEnabled()));
-       connect(bottomspaceCO, SIGNAL(activated(int)),
-               this, SLOT(checkEnabled()));
        connect(interlinespaceED, SIGNAL(editingFinished()),
                this, SLOT(checkEnabled()));
        connect(interlinespaceUnitCB, SIGNAL(selectionChanged(lyx::Length::UNIT)),
                this, SLOT(checkEnabled()));
-       connect(interlinespaceCO, SIGNAL(activated(int)),
-               this, SLOT(checkEnabled()));
        connect(booktabsRB, SIGNAL(clicked(bool)),
                this, SLOT(checkEnabled()));
        connect(borderDefaultRB, SIGNAL(clicked(bool)),
@@ -168,6 +162,30 @@ GuiTabular::GuiTabular(QWidget * parent)
 }
 
 
+void GuiTabular::on_topspaceCO_activated(int index)
+{
+       bool const enable = (index == 2);
+       topspaceED->setEnabled(enable);
+       topspaceUnitCB->setEnabled(enable);
+}
+
+
+void GuiTabular::on_bottomspaceCO_activated(int index)
+{
+       bool const enable = (index == 2);
+       bottomspaceED->setEnabled(enable);
+       bottomspaceUnitCB->setEnabled(enable);
+}
+
+
+void GuiTabular::on_interlinespaceCO_activated(int index)
+{
+       bool const enable = (index == 2);
+       interlinespaceED->setEnabled(enable);
+       interlinespaceUnitCB->setEnabled(enable);
+}
+
+
 void GuiTabular::checkEnabled()
 {
        // if there is a LaTeX argument, the width and alignment will be overwrtitten
index c36076f1d541f5baa21d7d3ef86b941fdaa6de5d..1d90afa60445f1f3938034432c2350a27b0fe297 100644 (file)
@@ -33,6 +33,9 @@ private Q_SLOTS:
        void checkEnabled();
        void borderSet_clicked();
        void borderUnset_clicked();
+       void on_topspaceCO_activated(int index);
+       void on_bottomspaceCO_activated(int index);
+       void on_interlinespaceCO_activated(int index);
 
 private:
        /// \name InsetParamsWidget inherited methods