mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32787 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a9fd4f4f95
commit
54975c9b53
@ -38,6 +38,12 @@ struct LevelButton : QCheckBox
|
|||||||
{
|
{
|
||||||
LevelButton(const QString& name) : QCheckBox(name) {}
|
LevelButton(const QString& name) : QCheckBox(name) {}
|
||||||
Debug::Type level;
|
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)));
|
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
|
||||||
|
|
||||||
toggle_button->blockSignals(true);
|
toggle_button->setCheckStatusSilent (Qt::PartiallyChecked);
|
||||||
toggle_button->setCheckState (Qt::PartiallyChecked);
|
|
||||||
toggle_button->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -129,17 +133,13 @@ void GuiProgressView::tristateChanged(int state)
|
|||||||
{
|
{
|
||||||
if (state != Qt::PartiallyChecked) {
|
if (state != Qt::PartiallyChecked) {
|
||||||
Q_FOREACH(LevelButton* button, level_buttons) {
|
Q_FOREACH(LevelButton* button, level_buttons) {
|
||||||
button->blockSignals(true);
|
button->setCheckStatusSilent(toggle_button->checkState());
|
||||||
button->setChecked(toggle_button->checkState());
|
|
||||||
button->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
int level = (state == Qt::Checked ? Debug::ANY : Debug::NONE);
|
int level = (state == Qt::Checked ? Debug::ANY : Debug::NONE);
|
||||||
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
|
dispatch(FuncRequest(LFUN_DEBUG_LEVEL_SET, convert<string>(level)));
|
||||||
} else {
|
} else {
|
||||||
Q_FOREACH(LevelButton* button, checked_buttons) {
|
Q_FOREACH(LevelButton* button, checked_buttons) {
|
||||||
button->blockSignals(true);
|
button->setCheckStatusSilent(Qt::Checked);
|
||||||
button->setChecked(true);
|
|
||||||
button->blockSignals(false);
|
|
||||||
}
|
}
|
||||||
levelChanged();
|
levelChanged();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user