# HG changeset patch # User Claus Gittinger # Date 1326892775 -3600 # Node ID 0f130285be97fb49b23e0eac338104d82949e031 # Parent aa4cdac32055d6bba304a3233d5f64dba847bfde changed: #findColorMapMode #updateColorsFromImage: diff -r aa4cdac32055 -r 0f130285be97 ImageEditor.st --- a/ImageEditor.st Wed Jan 18 11:36:38 2012 +0100 +++ b/ImageEditor.st Wed Jan 18 14:19:35 2012 +0100 @@ -3594,7 +3594,7 @@ image depth > 12 ifTrue:[ newListOfColors := OrderedCollection new. - image colorMap isEmptyOrNil ifTrue:[ + (image depth > 16 or:[image colorMap isEmptyOrNil]) ifTrue:[ someOrAllUsedColors := image usedColorsMax:10000. someOrAllUsedColors notNil ifTrue:[ someOrAllUsedColors := someOrAllUsedColors asArray. @@ -3632,7 +3632,8 @@ self listOfColors asOrderedCollection ~= newListOfColors ifTrue:[ self listOfColors contents:newListOfColors. ]. - "Modified: / 07-07-2006 / 12:27:43 / cg" + + "Modified: / 18-01-2012 / 13:58:38 / cg" ! update:something with:aParameter from:changedObject @@ -3766,15 +3767,22 @@ updateColorsFromImage:image |colors| + image depth > 16 ifTrue:[ + self listOfColors contents:#(). + ^ self. + ]. + colors := image colorMap. colors isNil ifTrue:[ Error handle:[:ex | colors := OrderedCollection new. ] do:[ colors := image usedColors asSet. - ] + ]. ]. self listOfColors contents:(colors asOrderedCollection). + + "Modified: / 18-01-2012 / 13:57:43 / cg" ! updateForNoImage