else if ( activeStudy() )
modName = "nomodule";
- QtxResourceMgr::WorkingMode prevMode = aResMgr->workingMode();
- aResMgr->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
+ QtxResourceMgr::WorkingMode prevMode = aResMgr->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
QByteArray aDefaultState;
aResMgr->value( "windows_geometry", modName, aDefaultState );
QByteArray aDefaultVisibility;
aResMgr->value( "windows_visibility", modName, aDefaultVisibility );
bool hasDefaultVisibility = !aDefaultVisibility.isEmpty();
- aResMgr->setWorkingMode(prevMode);
+ aResMgr->setWorkingMode( prevMode );
if( !storeWin && !storeTb && aDefaultState.isEmpty() && !hasDefaultVisibility)
return;
{
if ( myPrefs && myPrefs->resourceMgr() )
{
- QtxResourceMgr::WorkingMode prev = myPrefs->resourceMgr()->workingMode();
- myPrefs->resourceMgr()->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
+ QtxResourceMgr::WorkingMode prev = myPrefs->resourceMgr()->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
myPrefs->retrieve();
myPrefs->resourceMgr()->setWorkingMode( prev );
}
Note, that setValue() method always put the value to the user settings file.
\param mode new working mode
+ \return previous working mode
\sa workingMode(), value(), hasValue(), hasSection(), setValue()
*/
-void QtxResourceMgr::setWorkingMode( WorkingMode mode )
+QtxResourceMgr::WorkingMode QtxResourceMgr::setWorkingMode( WorkingMode mode )
{
+ WorkingMode m = myWorkingMode;
myWorkingMode = mode;
+ return m;
}
/*!
void clear();
WorkingMode workingMode() const;
- void setWorkingMode( WorkingMode );
+ WorkingMode setWorkingMode( WorkingMode );
bool value( const QString&, const QString&, int& ) const;
bool value( const QString&, const QString&, double& ) const;