From: vsr Date: Fri, 7 Nov 2008 15:08:47 +0000 (+0000) Subject: Fix wrong default style properties X-Git-Tag: V5_1_0rc1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=987ed0b9bfb4d4acdd2e334631b3e55879d2ca70;p=modules%2Fgui.git Fix wrong default style properties --- 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;