//asl: fix for 0020515
if ( activeStudy() ) {
saveDockWindowsState();
+ }
+
#ifdef SINGLE_DESKTOP
- if ( !closeDoc() )
- return;
+ if ( !checkExistingDoc() )
+ return;
#endif
- }
CAM_Application::onNewDoc();
}
{
SUIT_Study* study = activeStudy();
saveDockWindowsState();
- if (study) {
+
#ifdef SINGLE_DESKTOP
- if ( !closeDoc() )
- return;
+ if ( !checkExistingDoc() )
+ return;
#endif
- }
-
+
CAM_Application::onOpenDoc();
-
+
if ( !study ) // new study will be create in THIS application
{
updateWindows();
*/
bool LightApp_Application::onOpenDoc( const QString& aName )
{
- if ( activeStudy() ) {
#ifdef SINGLE_DESKTOP
- if ( !closeDoc() )
- return false;
+ if ( !checkExistingDoc() )
+ return false;
#endif
- }
// We should take mru action first because this application instance can be deleted later.
QtxMRUAction* mru = ::qobject_cast<QtxMRUAction*>( action( MRUId ) );
-
+
bool res = CAM_Application::onOpenDoc( aName );
if ( mru )
aStudy->setVisibilityStateForAll( Qtx::UnpresentableState );
}
}
+
+/*!
+ Check existing document.
+*/
+bool LightApp_Application::checkExistingDoc() {
+ return true;
+}
+