{
case CloseSave:
if ( activeStudy()->isSaved() )
- onSaveDoc();
- else if ( !onSaveAsDoc() )
+ onSaveDoc( true );
+ else if ( !onSaveAsDoc( true ) )
res = false;
break;
case CloseDiscard:
}
/*!Save document if all ok, else error message.*/
-void STD_Application::onSaveDoc()
+void STD_Application::onSaveDoc( bool exit )
{
if ( !activeStudy() )
return;
if ( myCustomPersistence )
{
- emit saveDoc();
+ emit saveDoc( exit );
return;
}
if ( isOk )
studySaved( activeStudy() );
else
- onSaveAsDoc();
+ onSaveAsDoc( exit );
}
/*! \retval TRUE, if doument saved successful, else FALSE.*/
-bool STD_Application::onSaveAsDoc()
+bool STD_Application::onSaveAsDoc( bool exit )
{
SUIT_Study* study = activeStudy();
if ( !study )
if ( myCustomPersistence )
{
- emit saveAsDoc();
+ emit saveAsDoc( exit );
return true;
}
void newDoc( const QString& );
void closeDoc();
void openDoc();
- void saveDoc();
- void saveAsDoc();
+ void saveDoc( bool exit );
+ void saveAsDoc( bool exit );
public slots:
virtual void onNewDoc();
virtual bool onNewDoc( const QString& );
virtual void onCloseDoc( bool ask = true );
- virtual void onSaveDoc();
- virtual bool onSaveAsDoc();
+ virtual void onSaveDoc( bool exit = false );
+ virtual bool onSaveAsDoc( bool exit = false );
virtual void onOpenDoc();
virtual bool onOpenDoc( const QString& );