mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Fixed preferences bug that caused themes to disappear when setting options.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@1855 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
7e0f9bbd1c
commit
bca9b2dee2
@ -2433,6 +2433,7 @@ void QgisApp::options()
|
||||
optionsDialog->addTheme(dirs[i]);
|
||||
}
|
||||
}
|
||||
optionsDialog->setCurrentTheme();
|
||||
if(optionsDialog->exec())
|
||||
{
|
||||
// set the theme if it changed
|
||||
|
@ -534,6 +534,7 @@ identifying features without zooming in very close.
|
||||
<slot>addTheme( QString item )</slot>
|
||||
<slot>themeChanged( const QString & )</slot>
|
||||
<slot>findBrowser()</slot>
|
||||
<slot>setCurrentTheme()</slot>
|
||||
</slots>
|
||||
<functions>
|
||||
<function access="private" specifier="non virtual">init()</function>
|
||||
|
@ -8,6 +8,7 @@
|
||||
*****************************************************************************/
|
||||
#include <qsettings.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qcombobox.h>
|
||||
|
||||
#include "qgssvgcache.h"
|
||||
|
||||
@ -26,7 +27,6 @@ void QgsOptionsBase::init()
|
||||
hideSplashFlag =true;
|
||||
}
|
||||
cbxHideSplash->setChecked(hideSplashFlag);
|
||||
cmbTheme->setCurrentText(settings.readEntry("/qgis/theme"));
|
||||
}
|
||||
void QgsOptionsBase::saveOptions()
|
||||
{
|
||||
@ -34,7 +34,12 @@ void QgsOptionsBase::saveOptions()
|
||||
settings.writeEntry("/qgis/browser", cmbBrowser->currentText());
|
||||
settings.writeEntry("/qgis/map/identifyRadius", spinBoxIdentifyValue->value());
|
||||
settings.writeEntry("/qgis/hideSplash",cbxHideSplash->isChecked());
|
||||
settings.writeEntry("/qgis/theme",cmbTheme->currentText());
|
||||
if(cmbTheme->currentText().length() == 0)
|
||||
{
|
||||
settings.writeEntry("/qgis/theme", "default");
|
||||
}else{
|
||||
settings.writeEntry("/qgis/theme",cmbTheme->currentText());
|
||||
}
|
||||
settings.writeEntry("/qgis/map/updateThreshold", spinBoxUpdateThreshold->value());
|
||||
QgsSVGCache::instance().setOversampling(spbSVGOversampling->value());
|
||||
settings.writeEntry("/qgis/svgoversampling", spbSVGOversampling->value());
|
||||
@ -57,6 +62,11 @@ void QgsOptionsBase::themeChanged(const QString & )
|
||||
|
||||
}
|
||||
|
||||
void QgsOptionsBase::setCurrentTheme()
|
||||
{
|
||||
QSettings settings;
|
||||
cmbTheme->setCurrentText(settings.readEntry("/qgis/theme","default"));
|
||||
}
|
||||
|
||||
void QgsOptionsBase::findBrowser()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user