git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32787 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2010-01-06 06:49:49 +00:00
parent a9fd4f4f95
commit 54975c9b53

View File

@ -38,6 +38,12 @@ struct LevelButton : QCheckBox
{
LevelButton(const QString& name) : QCheckBox(name) {}
Debug::Type level;
void setCheckStatusSilent(Qt::CheckState state) {
blockSignals(true);
setCheckState(state);
blockSignals(false);
}
};
@ -119,9 +125,7 @@ void GuiProgressView::levelChanged()
}
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
toggle_button->blockSignals(true);
toggle_button->setCheckState (Qt::PartiallyChecked);
toggle_button->blockSignals(false);
toggle_button->setCheckStatusSilent (Qt::PartiallyChecked);
}
@ -129,17 +133,13 @@ void GuiProgressView::tristateChanged(int state)
{
if (state != Qt::PartiallyChecked) {
Q_FOREACH(LevelButton* button, level_buttons) {
button->blockSignals(true);
button->setChecked(toggle_button->checkState());
button->blockSignals(false);
button->setCheckStatusSilent(toggle_button->checkState());
}
int level = (state == Qt::Checked ? Debug::ANY : Debug::NONE);
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
} else {
Q_FOREACH(LevelButton* button, checked_buttons) {
button->blockSignals(true);
button->setChecked(true);
button->blockSignals(false);
button->setCheckStatusSilent(Qt::Checked);
}
levelChanged();
}