Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
23641: [CEA] FIELDS Window not locked to panel.
[modules/gui.git]
/
src
/
LightApp
/
LightApp_Application.cxx
diff --git
a/src/LightApp/LightApp_Application.cxx
b/src/LightApp/LightApp_Application.cxx
index 6fbc2c7a8894b4c3bb6fd28a2e208e798c3467d0..21cc6176ff1e14314251da8f9fd45e7d3b358ebb 100644
(file)
--- a/
src/LightApp/LightApp_Application.cxx
+++ b/
src/LightApp/LightApp_Application.cxx
@@
-1020,10
+1020,15
@@
void LightApp_Application::onOpenDoc()
{
SUIT_Study* study = activeStudy();
{
SUIT_Study* study = activeStudy();
- if ( !checkExistingDoc() )
+ if ( !checkExistingDoc( false ) )
+ return;
+
+ QString aName = getFileName( true, QString(), getFileFilter( true ), QString(), 0 );
+ if ( aName.isNull() ) //Cancel
return;
return;
- CAM_Application::onOpenDoc();
+ closeDoc(false);
+ onOpenDoc( aName );
if ( !study ) // new study will be create in THIS application
{
if ( !study ) // new study will be create in THIS application
{
@@
-5157,7
+5162,7
@@
void LightApp_Application::onViewManagerRemoved( SUIT_ViewManager* )
/*!
Check existing document.
*/
/*!
Check existing document.
*/
-bool LightApp_Application::checkExistingDoc()
+bool LightApp_Application::checkExistingDoc(
bool closeExistingDoc
)
{
bool result = true;
if( activeStudy() ) {
{
bool result = true;
if( activeStudy() ) {
@@
-5171,17
+5176,23
@@
bool LightApp_Application::checkExistingDoc()
if(answer == 0) {
if ( activeStudy()->isSaved() ) {
onSaveDoc();
if(answer == 0) {
if ( activeStudy()->isSaved() ) {
onSaveDoc();
- closeDoc( false );
+ if (closeExistingDoc) {
+ closeDoc(false);
+ }
} else if ( onSaveAsDoc() ) {
} else if ( onSaveAsDoc() ) {
- if( !closeDoc( false ) ) {
- result = false;
+ if (closeExistingDoc) {
+ if( !closeDoc( false ) ) {
+ result = false;
+ }
}
} else {
result = false;
}
}
else if( answer == 1 ) {
}
} else {
result = false;
}
}
else if( answer == 1 ) {
- closeDoc( false );
+ if (closeExistingDoc) {
+ closeDoc( false );
+ }
} else if( answer == 2 ) {
result = false;
}
} else if( answer == 2 ) {
result = false;
}