]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java
Salome HOME
Cancel operation work correctly in the case of empty title of the document on the...
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / ImportDocumentAction.java
index 697f2b7d3a40b7490a05beedc8fc9630f42481b2..77713cbf5a4e1d1e42c5d5ef121d62ff2bccc5f0 100644 (file)
@@ -212,9 +212,7 @@ public class ImportDocumentAction extends BaseUploadDocumentAction {
                initializationScreenContext(Constants.STUDY_MENU, Constants.STUDY_MENU,
                                Constants.TRUE);
 
-               if (_action == ToDo.cancel) {
-                       res = "cancel";
-               } else if (_documentType == 0) {
+               if (_documentType == 0) {
                        setErrorCode("message.error.import.type");
 
                        initializationFullScreenContext(Constants.STUDY_MENU,
@@ -265,7 +263,12 @@ public class ImportDocumentAction extends BaseUploadDocumentAction {
                                //
                                // if (send != null) send.converts(addoc); // Asynchronous process
 
-                               _mystudy.add(addoc); // Updates the presentation
+                               if (uses.isEmpty()) {
+                                       _mystudy.add(addoc); // Updates the presentation
+                               } else {
+                                       // Re-opening (refreshing) the currently open study
+                                       refreshStudy();
+                               }
                                res = SUCCESS;
                        } catch (FileNotFoundException error) {
                                LOG.error("Reason:", error);