@@ -806,6 +806,10 @@ def get_image_type(self):
806
806
- Most events return EVENT_HANDLED even if they did not change anything
807
807
in current situations. I would expect specifically for stack base cards
808
808
that they return HANDLE_PROPAGATE if nothing happened.
809
+ - stack __defaultclickhandler__ returns EVENT_HANDLED in any case so some
810
+ code here is obsolete or for future.
811
+ - A pragmatic way to handle this: If an empty stack is still empty
812
+ after the click then we propagate otherwise not.
809
813
LB241111.
810
814
'''
811
815
@@ -851,7 +855,6 @@ def on_touch_down(self, touch):
851
855
self .dragstart = touch .pos
852
856
event .cardid = i
853
857
r = self .send_event_pressed (touch , event )
854
- # print("********* event return = ",r)
855
858
if r == EVENT_HANDLED :
856
859
AndroidScreenRotation .lock (toaster = False )
857
860
print ('grab' )
@@ -869,7 +872,8 @@ def on_touch_down(self, touch):
869
872
event .y = ppos [1 ]
870
873
r = self .group .bindings ['<1>' ](event )
871
874
if r == EVENT_HANDLED :
872
- return True
875
+ if len (self .group .stack .cards ) > 0 :
876
+ return True
873
877
return False
874
878
875
879
if self .card is None :
@@ -907,7 +911,6 @@ def on_touch_up(self, touch):
907
911
event .y = ppos [1 ]
908
912
event .cardid = i
909
913
r = self .send_event_released_1 (event )
910
- # print("********* event return = ",r)
911
914
if r == EVENT_HANDLED :
912
915
return True
913
916
return False
@@ -922,7 +925,8 @@ def on_touch_up(self, touch):
922
925
event .y = ppos [1 ]
923
926
r = self .group .bindings ['<ButtonRelease-1>' ](event )
924
927
if r == EVENT_HANDLED :
925
- return True
928
+ if len (self .group .stack .cards ) > 0 :
929
+ return True
926
930
return False
927
931
928
932
if self .card is None :
0 commit comments