mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Fix UI glitch in the prefs dialog (bug 7190).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37082 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
61e7c1472e
commit
2c48ac2626
@ -970,29 +970,35 @@ PrefDisplay::PrefDisplay(GuiPreferences * form)
|
|||||||
connect(displayGraphicsCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(displayGraphicsCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
||||||
connect(instantPreviewCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
|
connect(instantPreviewCO, SIGNAL(activated(int)), this, SIGNAL(changed()));
|
||||||
connect(previewSizeSB, SIGNAL(valueChanged(double)), this, SIGNAL(changed()));
|
connect(previewSizeSB, SIGNAL(valueChanged(double)), this, SIGNAL(changed()));
|
||||||
if (instantPreviewCO->currentIndex() == 0)
|
|
||||||
previewSizeSB->setEnabled(false);
|
|
||||||
else
|
|
||||||
previewSizeSB->setEnabled(true);
|
|
||||||
connect(paragraphMarkerCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
connect(paragraphMarkerCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefDisplay::on_instantPreviewCO_currentIndexChanged(int index)
|
void PrefDisplay::on_instantPreviewCO_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (index == 0)
|
previewSizeSB->setEnabled(index != 0);
|
||||||
previewSizeSB->setEnabled(false);
|
}
|
||||||
else
|
|
||||||
previewSizeSB->setEnabled(true);
|
|
||||||
|
void PrefDisplay::on_displayGraphicsCB_toggled(bool on)
|
||||||
|
{
|
||||||
|
instantPreviewCO->setEnabled(on);
|
||||||
|
previewSizeSB->setEnabled(on && instantPreviewCO->currentIndex() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrefDisplay::apply(LyXRC & rc) const
|
void PrefDisplay::apply(LyXRC & rc) const
|
||||||
{
|
{
|
||||||
switch (instantPreviewCO->currentIndex()) {
|
switch (instantPreviewCO->currentIndex()) {
|
||||||
case 0: rc.preview = LyXRC::PREVIEW_OFF; break;
|
case 0:
|
||||||
case 1: rc.preview = LyXRC::PREVIEW_NO_MATH; break;
|
rc.preview = LyXRC::PREVIEW_OFF;
|
||||||
case 2: rc.preview = LyXRC::PREVIEW_ON; break;
|
break;
|
||||||
|
case 1:
|
||||||
|
rc.preview = LyXRC::PREVIEW_NO_MATH;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
rc.preview = LyXRC::PREVIEW_ON;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.display_graphics = displayGraphicsCB->isChecked();
|
rc.display_graphics = displayGraphicsCB->isChecked();
|
||||||
@ -1027,6 +1033,9 @@ void PrefDisplay::update(LyXRC const & rc)
|
|||||||
instantPreviewCO->setEnabled(rc.display_graphics);
|
instantPreviewCO->setEnabled(rc.display_graphics);
|
||||||
previewSizeSB->setValue(rc.preview_scale_factor);
|
previewSizeSB->setValue(rc.preview_scale_factor);
|
||||||
paragraphMarkerCB->setChecked(rc.paragraph_markers);
|
paragraphMarkerCB->setChecked(rc.paragraph_markers);
|
||||||
|
previewSizeSB->setEnabled(
|
||||||
|
rc.display_graphics
|
||||||
|
&& rc.preview != LyXRC::PREVIEW_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,6 +275,7 @@ public:
|
|||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void on_instantPreviewCO_currentIndexChanged(int);
|
void on_instantPreviewCO_currentIndexChanged(int);
|
||||||
|
void on_displayGraphicsCB_toggled(bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,6 +154,9 @@ What's new
|
|||||||
- Wake up from waiting state after encountering a file parsing error
|
- Wake up from waiting state after encountering a file parsing error
|
||||||
(bug 6950).
|
(bug 6950).
|
||||||
|
|
||||||
|
- Fix enabling/disabling of Instant Preview widgets in the preferences
|
||||||
|
dialog (bug 7190).
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user