equal
deleted
inserted
replaced
607 |
607 |
608 anEvent isButtonMotionEvent ifTrue:[ |
608 anEvent isButtonMotionEvent ifTrue:[ |
609 "/ use current point - layout of underlaying view might change |
609 "/ use current point - layout of underlaying view might change |
610 "/ and computation dependent on origin is wrong |
610 "/ and computation dependent on origin is wrong |
611 p := self sensor mousePoint. |
611 p := self sensor mousePoint. |
612 p := device translatePoint:p fromView:nil toView:self. |
612 p := self graphicsDevice translatePoint:p fromView:nil toView:self. |
613 ] ifFalse:[ |
613 ] ifFalse:[ |
614 p := (anEvent x) @ (anEvent y). |
614 p := (anEvent x) @ (anEvent y). |
615 p := device translatePoint:p fromView:evView toView:self. |
615 p := self graphicsDevice translatePoint:p fromView:evView toView:self. |
616 ]. |
616 ]. |
617 |
617 |
618 "/ patch the event |
618 "/ patch the event |
619 anEvent x:p x. |
619 anEvent x:p x. |
620 anEvent y:p y. |
620 anEvent y:p y. |
917 ^ self |
917 ^ self |
918 ] |
918 ] |
919 ]. |
919 ]. |
920 viewOperatedUpon := selectedView. |
920 viewOperatedUpon := selectedView. |
921 |
921 |
922 pView := device translatePoint:aPoint fromView:self toView:selectedView superView. |
922 pView := self graphicsDevice translatePoint:aPoint fromView:self toView:selectedView superView. |
923 (selectedView bounds containsPoint:pView) ifFalse:[ |
923 (selectedView bounds containsPoint:pView) ifFalse:[ |
924 "/ clicked outside the selection |
924 "/ clicked outside the selection |
925 (self sensor ctrlDown and:[self canChangeLayoutOfView:selectedView]) ifFalse:[ |
925 (self sensor ctrlDown and:[self canChangeLayoutOfView:selectedView]) ifFalse:[ |
926 viewOperatedUpon := nil |
926 viewOperatedUpon := nil |
927 ] |
927 ] |
1456 "/ reverse search, to find covering ones first. |
1456 "/ reverse search, to find covering ones first. |
1457 aView subViews reverseDo:[:aSubView | |
1457 aView subViews reverseDo:[:aSubView | |
1458 |innerObject relPoint| |
1458 |innerObject relPoint| |
1459 |
1459 |
1460 ((aSubView origin extent:aSubView extent) containsPoint:aPoint) ifTrue:[ |
1460 ((aSubView origin extent:aSubView extent) containsPoint:aPoint) ifTrue:[ |
1461 relPoint := device translatePoint:aPoint fromView:aView toView:aSubView. |
1461 relPoint := self graphicsDevice translatePoint:aPoint fromView:aView toView:aSubView. |
1462 innerObject := self findObjectAt:relPoint in:aSubView. |
1462 innerObject := self findObjectAt:relPoint in:aSubView. |
1463 innerObject notNil ifTrue:[ ^ innerObject ]. |
1463 innerObject notNil ifTrue:[ ^ innerObject ]. |
1464 lastHit := aSubView. |
1464 lastHit := aSubView. |
1465 lastRelPoint := relPoint. |
1465 lastRelPoint := relPoint. |
1466 ] |
1466 ] |
1607 |
1607 |
1608 |coll| |
1608 |coll| |
1609 |
1609 |
1610 selectionHiddenLevel == 0 ifTrue:[ |
1610 selectionHiddenLevel == 0 ifTrue:[ |
1611 self hideSelection. |
1611 self hideSelection. |
1612 device flush. |
1612 self flush. |
1613 ]. |
1613 ]. |
1614 selectionHiddenLevel := selectionHiddenLevel + 1. |
1614 selectionHiddenLevel := selectionHiddenLevel + 1. |
1615 |
1615 |
1616 aBlock |
1616 aBlock |
1617 ensure:[ |
1617 ensure:[ |
1801 |
1801 |
1802 oldClipped ~~ clipChildren ifTrue:[ |
1802 oldClipped ~~ clipChildren ifTrue:[ |
1803 self clippedByChildren:(clipChildren := oldClipped). |
1803 self clippedByChildren:(clipChildren := oldClipped). |
1804 ]. |
1804 ]. |
1805 |
1805 |
1806 device flush. |
1806 self flush. |
1807 |
1807 |
1808 savedSelection := selection. |
1808 savedSelection := selection. |
1809 [ |
1809 [ |
1810 selection := nil. |
1810 selection := nil. |
1811 damages do:[:el| self invalidate:el ]. |
1811 damages do:[:el| self invalidate:el ]. |