(image with colorMap size = 1)-bug fixed
authortz
Mon, 30 Mar 1998 14:50:20 +0200
changeset 756 52a76ec8828d
parent 755 cfbbec0a33c6
child 757 d28fb65967a9
(image with colorMap size = 1)-bug fixed
ImageEditor.st
--- a/ImageEditor.st	Mon Mar 30 14:47:36 1998 +0200
+++ b/ImageEditor.st	Mon Mar 30 14:50:20 1998 +0200
@@ -59,7 +59,7 @@
 
 openModalOnClass: aClass andSelector: aSelector
 
-    "self openModalOnClass: self andSelector: #newImageIcon"
+    "self openModalOnClass: self andSelector: #leftMouseKeyIcon"
 
     |imageEditor imageEditView className resourceClassName resourceSelector|                      
     imageEditor := self new.
@@ -79,7 +79,7 @@
 
 openOnClass: aClass andSelector: aSelector
 
-    "self openOnClass: self andSelector: #newImageIcon"
+    "self openOnClass: self andSelector: #leftMouseKeyIcon"
 
     ^self open loadFromMessage: aClass name, ' ', aSelector
 !
@@ -313,11 +313,11 @@
           #window: 
            #(#WindowSpec
               #name: 'Image Editor'
-              #layout: #(#LayoutFrame 392 0 309 0 891 0 654 0)
+              #layout: #(#LayoutFrame 188 0 318 0 687 0 663 0)
               #label: 'Image Editor'
               #min: #(#Point 400 320)
               #max: #(#Point 1152 900)
-              #bounds: #(#Rectangle 392 309 892 655)
+              #bounds: #(#Rectangle 188 318 688 664)
               #menu: #menu
               #usePreferredExtent: false
           )
@@ -373,8 +373,8 @@
                                                             #hasVerticalScrollBar: true
                                                             #miniScrollerHorizontal: true
                                                             #miniScrollerVertical: true
+                                                            #level: -1
                                                             #dataList: #listOfColors
-                                                            #level: -1
                                                             #has3Dsepartors: true
                                                             #verticalSpacing: 1
                                                             #columns: 
@@ -439,6 +439,7 @@
                                         #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
                                         #level: -1
                                         #adjust: #left
+                                        #resizeForLabel: false
                                     )
                                      #(#ArrowButtonSpec
                                         #name: 'magnifyDownButton'
@@ -816,11 +817,6 @@
                 )
             )
              #(#MenuItem
-                #label: 'History'
-                #activeHelpKey: #history
-                #submenuChannel: #menuHistory
-            )
-             #(#MenuItem
                 #label: 'Settings'
                 #submenu: 
                  #(#Menu
@@ -835,6 +831,11 @@
                 )
             )
              #(#MenuItem
+                #label: 'History'
+                #activeHelpKey: #history
+                #submenuChannel: #menuHistory
+            )
+             #(#MenuItem
                 #label: 'Help'
                 #startGroup: #right
                 #activeHelpKey: #help
@@ -1179,13 +1180,13 @@
     [   
          self colorMapMode: colorMapMode value: nil
     ].       
-    self imageEditView selectColor: (Array with: (self listOfColors at: 1) with: (self listOfColors at: 2)).
+    self imageEditView selectColor: (Array with: (self listOfColors at: 1) with: (self listOfColors at: 2 ifAbsent: [self listOfColors at: 1])).
     self image mask notNil
     ifTrue:
     [
         colorMapMode := colorMapMode, ' + mask'.
         self listOfColors addFirst: (Color basicNew setColorId:0).
-        self imageEditView selectColor: (Array with: (self listOfColors at: 2) with: (self listOfColors at: 1)).
+        self imageEditView selectColor: (Array with: (self listOfColors at: 1 ifAbsent: [self listOfColors at: 2]) with: (self listOfColors at: 1)).
     ].
     self selectionOfColor value: 0.
     self selectionOfColor value: (self listOfColors indexOf: self imageEditView selectedColor).
@@ -1375,8 +1376,9 @@
 
     self loadFromFile:
         (FileSelectionBrowser
-            request: 'Load Image From' 
-            fileFilters: FileSelectionBrowser loadImageFileNameFilters)
+            request: 'Load Image From'
+            fileName: (self image notNil ifTrue: [self image fileName] ifFalse: [nil])
+            withFileFilters: FileSelectionBrowser loadImageFileNameFilters)
 !
 
 loadFromFile: aFileName