Fixed writting of configuration so that hidden options are not overridden by default values.
This commit is contained in:
parent
b24b9a99f3
commit
2023fb58f4
1 changed files with 5 additions and 3 deletions
|
@ -144,8 +144,11 @@ namespace Oxygen
|
|||
void Config::save( KConfigGroup& )
|
||||
{
|
||||
|
||||
// create configuration from UI
|
||||
Configuration configuration;
|
||||
// create configuration from group
|
||||
KConfigGroup configurationGroup( _configuration, "Windeco" );
|
||||
Configuration configuration( configurationGroup );
|
||||
|
||||
// apply modifications from ui
|
||||
configuration.setTitleAlignment( Configuration::titleAlignment( ui->ui.titleAlignment->currentText(), true ) );
|
||||
configuration.setCenterTitleOnFullWidth( ui->ui.titleAlignment->currentText() == Configuration::titleAlignmentName( Qt::AlignHCenter, true, true ) );
|
||||
configuration.setButtonSize( Configuration::buttonSize( ui->ui.buttonSize->currentText(), true ) );
|
||||
|
@ -173,7 +176,6 @@ namespace Oxygen
|
|||
}
|
||||
|
||||
// save standard configuration
|
||||
KConfigGroup configurationGroup( _configuration, "Windeco");
|
||||
configurationGroup.deleteGroup();
|
||||
configuration.write( configurationGroup );
|
||||
|
||||
|
|
Loading…
Reference in a new issue