From ede4c8c3708bcf823477b2b7096c4d0fcb9f3b65 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 7 Feb 2010 21:12:46 +0000 Subject: [PATCH] GuiBox: don't call applyView twice git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33353 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiBox.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index aaffcb3388..bd3321e200 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -95,12 +95,9 @@ GuiBox::GuiBox(GuiView & lv) connect(widthUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), this, SLOT(applyView())); connect(valignCO, SIGNAL(highlighted(QString)), this, SLOT(applyView())); - connect(heightCB, SIGNAL(stateChanged(int)), this, SLOT(applyView())); connect(heightED, SIGNAL(textChanged(QString)), this, SLOT(applyView())); connect(heightUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), this, SLOT(applyView())); - connect(innerBoxCO, SIGNAL(activated(int)), this, SLOT(applyView())); - connect(typeCO, SIGNAL(activated(int)), this, SLOT(applyView())); connect(halignCO, SIGNAL(activated(int)), this, SLOT(applyView())); connect(ialignCO, SIGNAL(activated(int)), this, SLOT(applyView())); @@ -184,6 +181,7 @@ void GuiBox::on_heightCB_stateChanged(int state) && (state == Qt::Checked); heightED->setEnabled(enable); heightUnitsLC->setEnabled(enable); + applyView(); } @@ -193,17 +191,17 @@ void GuiBox::on_pagebreakCB_stateChanged() innerBoxCO->setEnabled(!pbreak); widthED->setEnabled(!pbreak); widthUnitsLC->setEnabled(!pbreak); - if (pbreak) { - valignCO->setEnabled(false); - ialignCO->setEnabled(false); - halignCO->setEnabled(false); - heightCB->setEnabled(false); - heightED->setEnabled(false); - heightUnitsLC->setEnabled(false); - setSpecial(false); - } else { + if (!pbreak) { on_typeCO_activated(typeCO->currentIndex()); + return; } + valignCO->setEnabled(false); + ialignCO->setEnabled(false); + halignCO->setEnabled(false); + heightCB->setEnabled(false); + heightED->setEnabled(false); + heightUnitsLC->setEnabled(false); + setSpecial(false); applyView(); } -- 2.39.2