Skip to content

Commit 970b5f0

Browse files
committed
Edit some code to replace iteration on array to array first
1 parent 61da39a commit 970b5f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Pyramid-Bloc/PyramidShortcutCopyPasteCut.class.st

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PyramidShortcutCopyPasteCut >> copySelectedElementInSpace [
5050
elementCollectionSelected isEmpty
5151
ifTrue: [ ^ self ].
5252
elementCollectionSelected size = 1
53-
ifTrue: [ elementCollectionSelected do: [ :element | copyPastePlugin copyAsStonInClipboard: element ]. ^ 1 ]
53+
ifTrue: [ copyPastePlugin copyAsStonInClipboard: (elementCollectionSelected first). ^ 1 ]
5454
ifFalse: [ self inform: 'Can not copy multiple element' ]
5555

5656

@@ -113,7 +113,7 @@ PyramidShortcutCopyPasteCut >> pasteElement [
113113
elementCollectionSelected isEmpty
114114
ifTrue: [ copyPastePlugin pasteFromClipboardOnFirstLevelElements ].
115115
elementCollectionSelected size = 1
116-
ifTrue: [ elementCollectionSelected do: [ :element | copyPastePlugin pasteFromClipboardOnSelection: element ]. ]
116+
ifTrue: [ copyPastePlugin pasteFromClipboardOnSelection: (elementCollectionSelected first) ]
117117

118118

119119

@@ -134,7 +134,7 @@ PyramidShortcutCopyPasteCut >> shortcutActionCopy [
134134
PyramidShortcutCopyPasteCut >> shortcutActionCut [
135135

136136
^ shortcutCut := BlShortcutWithAction new
137-
name: 'Pyramid edition shortcut paste';
137+
name: 'Pyramid edition shortcut cut';
138138
combination: keyCombinationCut;
139139
action: [ :event | copyPastePlugin
140140
ifNil: [ self inform: 'Plugin Copy/Paste is not installed' ]

0 commit comments

Comments
 (0)