GuiBox: don't call applyView twice

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33353 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2010-02-07 21:12:46 +00:00
parent 3e5ed356c0
commit ede4c8c370

View File

@ -95,12 +95,9 @@ GuiBox::GuiBox(GuiView & lv)
connect(widthUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), connect(widthUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
this, SLOT(applyView())); this, SLOT(applyView()));
connect(valignCO, SIGNAL(highlighted(QString)), 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(heightED, SIGNAL(textChanged(QString)), this, SLOT(applyView()));
connect(heightUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)), connect(heightUnitsLC, SIGNAL(selectionChanged(lyx::Length::UNIT)),
this, SLOT(applyView())); 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(halignCO, SIGNAL(activated(int)), this, SLOT(applyView()));
connect(ialignCO, 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); && (state == Qt::Checked);
heightED->setEnabled(enable); heightED->setEnabled(enable);
heightUnitsLC->setEnabled(enable); heightUnitsLC->setEnabled(enable);
applyView();
} }
@ -193,7 +191,10 @@ void GuiBox::on_pagebreakCB_stateChanged()
innerBoxCO->setEnabled(!pbreak); innerBoxCO->setEnabled(!pbreak);
widthED->setEnabled(!pbreak); widthED->setEnabled(!pbreak);
widthUnitsLC->setEnabled(!pbreak); widthUnitsLC->setEnabled(!pbreak);
if (pbreak) { if (!pbreak) {
on_typeCO_activated(typeCO->currentIndex());
return;
}
valignCO->setEnabled(false); valignCO->setEnabled(false);
ialignCO->setEnabled(false); ialignCO->setEnabled(false);
halignCO->setEnabled(false); halignCO->setEnabled(false);
@ -201,9 +202,6 @@ void GuiBox::on_pagebreakCB_stateChanged()
heightED->setEnabled(false); heightED->setEnabled(false);
heightUnitsLC->setEnabled(false); heightUnitsLC->setEnabled(false);
setSpecial(false); setSpecial(false);
} else {
on_typeCO_activated(typeCO->currentIndex());
}
applyView(); applyView();
} }