+/*! Reload document from the file.*/
+bool STD_Application::onReopenDoc()
+{
+ bool res = false;
+
+ SUIT_Study* study = activeStudy();
+ if ( study && study->isSaved() ) {
+ // ask user for the confirmation
+ if ( SUIT_MessageBox::question( desktop(), tr( "REOPEN_STUDY" ), tr( "REOPEN_QUESTION" ),
+ SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No
+ ) == SUIT_MessageBox::No )
+ return false;
+
+ // remember study name
+ QString studyName = study->studyName();
+
+ // close study
+ beforeCloseDoc( study );
+ study->closeDocument( true );
+
+ // update views / windows / status bar / title
+ clearViewManagers();
+ setActiveStudy( 0 );
+ updateDesktopTitle();
+ updateCommandsStatus();
+
+ // delete study
+ delete study;
+ study = 0;
+
+ // post closing actions
+ afterCloseDoc();
+
+ // reload study from the file
+ res = useFile( studyName ) && activeStudy();
+
+ // if reloading is failed, close the desktop
+ if ( !res ) {
+ setDesktop( 0 );
+ closeApplication();
+ }
+ }
+ return res;
+}
+