From 987ed0b9bfb4d4acdd2e334631b3e55879d2ca70 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 7 Nov 2008 15:08:47 +0000 Subject: [PATCH] Fix wrong default style properties --- src/Style/Style_Model.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Style/Style_Model.cxx b/src/Style/Style_Model.cxx index ae4a13d6e..6ef22a5fe 100644 --- a/src/Style/Style_Model.cxx +++ b/src/Style/Style_Model.cxx @@ -93,13 +93,13 @@ Style_Model::~Style_Model() The simplest way it can be done is using static functions of Style_Salome class: Style_Salome::apply(), Style_Salome::restore() - \param reset if \c true model is first restores default values of all properties + \param reset if \c true model is also initializes preoperties from the application \sa restore(), fromResources() \sa Style_Salome class */ void Style_Model::fromApplication( bool reset ) { - if ( reset ) initDefaults(); + initDefaults(); if ( !QApplication::instance() ) // application object is not created yet return; @@ -115,6 +115,8 @@ void Style_Model::fromApplication( bool reset ) // initialize style properties from the application + if ( !reset ) return; + // font myFont = myAppData->myFont; // colors @@ -157,7 +159,7 @@ void Style_Model::fromApplication( bool reset ) void Style_Model::fromResources( QtxResourceMgr* resMgr, const QString& resSection ) { // init from application - fromApplication( true ); + fromApplication( false ); myResourceMgr = resMgr; myResourceSection = resSection; -- 2.39.2