#FEATURE by stefan
authorStefan Vogel <sv@exept.de>
Wed, 29 Apr 2020 22:34:37 +0200
changeset 4460 e067415ddf46
parent 4459 d9dcc1802edc
child 4461 eb7635490a02
#FEATURE by stefan class: ApplicationModel added: #isDialog changed: #doAccept
ApplicationModel.st
--- a/ApplicationModel.st	Wed Apr 29 17:22:09 2020 +0200
+++ b/ApplicationModel.st	Wed Apr 29 22:34:37 2020 +0200
@@ -2650,22 +2650,21 @@
     "/ In that, case, we have no acceptHolder (see SimpleDialog),
     "/ to remember the accept vs. cancel case.
     "/
-    self window isModal ifTrue:[
-        masterApplication notNil ifTrue:[
-            masterApplication window topView == self window topView ifTrue:[
-                masterApplication window isModal ifTrue:[
-                    masterApplication doAccept.
-                    ^ self.
-                ].
-            ].
-        ].
-
-        "/ mhmh - is this a good idea ?
-        self perform:#accept ifNotUnderstood:[self closeRequest].
-        ^ self
+    self window isModal ifFalse:[
+        ^ self.
     ].
-
-    ^ self      "/ nothing done here ...
+    
+    (masterApplication notNil 
+     and:[masterApplication window isModal
+     and:[masterApplication window topView == self window topView]]) ifTrue:[
+        masterApplication doAccept.
+        ^ self.
+    ].
+
+    "/ mhmh - is this a good idea ?
+    self perform:#accept ifNotUnderstood:[self closeRequest].
+
+    "Modified: / 29-04-2020 / 13:19:30 / Stefan Vogel"
 !
 
 doAcceptByReturnKey
@@ -4440,6 +4439,14 @@
 
 isApplicationModel
     ^ true
+!
+
+isDialog
+    "answer true, if I am an application rpresenting a dialog"
+
+    ^ self subclassResponsibility
+
+    "Modified (comment): / 29-04-2020 / 12:39:38 / Stefan Vogel"
 ! !
 
 !ApplicationModel methodsFor:'translating'!