From: Abdelrazak Younes Date: Sat, 4 Dec 2010 10:55:03 +0000 (+0000) Subject: Fix #7021: the problem was that activating the border combo was triggering dialogToPa... X-Git-Tag: 2.0.0~1516 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ecc492a3ce04dce62970946e4a3cd1e092a120d0;p=features.git Fix #7021: the problem was that activating the border combo was triggering dialogToParams() and thus disallowed because of the empty value. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36712 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 8ffa2f3146..a2dec894bb 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -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 diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index c36076f1d5..1d90afa604 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -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