Skip to content

Commit

Permalink
Properly disable insert selection button
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilian-franz committed Jul 14, 2021
1 parent c2905ab commit 2530912
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
clipboardForm: aForm
clipboardForm := aForm
clipboardForm := aForm.
self triggerEvent: #clipBoardFilled
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ finishSelection
bottomRight := self getBackendPointFor: (self temporaryGeometricMorph bottomRight - self canvas position).

self clipboardForm: (self backend form contentsOfArea: (Rectangle origin: topLeft corner: bottomRight)).

self temporaryGeometricMorph delete

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"chooseFont" : "mFr 6/24/2021 17:25",
"circleCursor" : "CS 6/28/2021 21:21",
"clipboardForm" : "ms 7/8/2021 17:25",
"clipboardForm:" : "ms 7/8/2021 17:24",
"clipboardForm:" : "mFr 7/14/2021 16:55",
"commitText" : "mFr 6/24/2021 17:40",
"currentCursor" : "CS 6/28/2021 21:19",
"currentCursor:" : "CS 6/28/2021 21:19",
Expand All @@ -26,7 +26,7 @@
"eraserSize" : "CS 6/23/2021 14:15",
"fillShape" : "CS 6/28/2021 21:25",
"finishGeometricForm" : "mFr 6/24/2021 17:57",
"finishSelection" : "ms 7/8/2021 17:43",
"finishSelection" : "mFr 7/14/2021 16:41",
"formExtent" : "JP 6/26/2021 17:26",
"getBackendPointFor:" : "CS 6/28/2021 21:22",
"getCircleOrigin:" : "K.P. 6/26/2021 16:51",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tooling
enableInsertSelectionButton
(self findMenuItemWith: M2InsertSelection label) isEnabled: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
findMenuItemWith: aString
self submenuDict valuesDo: [:submenu |
submenu detect: [:item |
item isMenuItemMorph and: [item contents = aString]] ifFound: [:item | ^ item]].
^ self error: aString, ' could not be found'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
initialization
initialize
super initialize.
self viewPort when: #clipBoardFilled send: #enableInsertSelectionButton to: self.
self
initializePanels;
setLabel: 'Morphic Monet';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ accessing
menuGeometricCollection
^ menuGeometricCollection ifNil: [menuGeometricCollection := (OrderedCollection new)
add: (M2Select getMenuItemForTarget: self viewPort);
add: (M2InsertSelection getMenuItemForTarget: self viewPort);
add: ((M2InsertSelection getMenuItemForTarget: self viewPort) isEnabled: false);
add: (M2FillArea getMenuItemForTarget: self viewPort);
add: (M2GeometricCircle getMenuItemForTarget: self viewPort);
add: (M2GeometricRectangle getMenuItemForTarget: self viewPort);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
"colorPicker" : "mFr 5/19/2021 10:59",
"defaultBrushSizeSlider" : "CS 6/2/2021 14:56",
"defaultColorPicker" : "ms 6/16/2021 10:33",
"enableInsertSelectionButton" : "mFr 7/14/2021 16:54",
"exportPNG" : "mFr 5/19/2021 11:00",
"findMenuItemWith:" : "mFr 7/14/2021 16:57",
"form" : "mFr 5/19/2021 11:00",
"getNameOfFileToExport" : "mFr 5/19/2021 11:00",
"getNameOfFileToImport" : "mFr 6/9/2021 17:50",
"handleKeystroke:" : "mFr 5/19/2021 11:00",
"importImage" : "mFr 6/3/2021 21:17",
"importImage:" : "mFr 6/3/2021 21:17",
"initialize" : "K.P. 5/29/2021 14:20",
"initialize" : "mFr 7/14/2021 16:39",
"initializeCanvasPanel" : "mk 7/27/2020 20:15",
"initializeColorPanel" : "mFr 5/19/2021 11:01",
"initializeMenuPanel" : "mFr 5/26/2021 12:21",
Expand All @@ -44,7 +46,7 @@
"loadMenu" : "mFr 5/19/2021 12:45",
"menuBrushCollection" : "CS 6/28/2021 21:28",
"menuBrushCollection:" : "mFr 5/19/2021 12:17",
"menuGeometricCollection" : "ms 7/8/2021 17:20",
"menuGeometricCollection" : "mFr 7/14/2021 16:35",
"menuGeometricCollection:" : "mFr 5/19/2021 12:17",
"menuMiscCollection" : "mFr 6/3/2021 21:16",
"menuMiscCollection:" : "mFr 5/19/2021 12:17",
Expand Down

0 comments on commit 2530912

Please sign in to comment.