forked from qt-creator/qt-creator
make zoom-in store the new size permanently in the settings.
This commit is contained in:
@@ -458,14 +458,17 @@ void FontSettingsPage::apply()
|
||||
const int size = d_ptr->ui.sizeComboBox->currentText().toInt(&ok);
|
||||
if (ok)
|
||||
d_ptr->m_value.setFontSize(size);
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
|
||||
void FontSettingsPage::saveSettings()
|
||||
{
|
||||
if (d_ptr->m_value != d_ptr->m_lastValue) {
|
||||
d_ptr->m_lastValue = d_ptr->m_value;
|
||||
if (QSettings *settings = Core::ICore::instance()->settings())
|
||||
d_ptr->m_value.toSettings(d_ptr->m_settingsGroup, d_ptr->m_descriptions, settings);
|
||||
d_ptr->m_lastValue = d_ptr->m_value;
|
||||
if (QSettings *settings = Core::ICore::instance()->settings())
|
||||
d_ptr->m_value.toSettings(d_ptr->m_settingsGroup, d_ptr->m_descriptions, settings);
|
||||
|
||||
QTimer::singleShot(0, this, SLOT(delayedChange()));
|
||||
QTimer::singleShot(0, this, SLOT(delayedChange()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@ public:
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
void saveSettings();
|
||||
|
||||
const FontSettings &fontSettings() const;
|
||||
|
||||
signals:
|
||||
|
||||
@@ -175,7 +175,7 @@ void TextEditorSettings::fontSizeRequested(int pointSize)
|
||||
{
|
||||
FontSettings &fs = const_cast<FontSettings&>(m_fontSettingsPage->fontSettings());
|
||||
fs.setFontSize(pointSize);
|
||||
emit fontSettingsChanged(m_fontSettingsPage->fontSettings());
|
||||
m_fontSettingsPage->saveSettings();
|
||||
}
|
||||
|
||||
FontSettings TextEditorSettings::fontSettings() const
|
||||
|
||||
Reference in New Issue
Block a user