--- a/ImageEditor.st Mon Aug 01 16:04:20 2005 +0200
+++ b/ImageEditor.st Tue Aug 02 12:43:28 2005 +0200
@@ -2174,6 +2174,7 @@
label: 'Clear Masked Pixels'
itemValue: clearMaskedPixels
translateLabel: true
+ enabled: hasMask
)
)
nil
@@ -3361,7 +3362,8 @@
updateImagePreView
self tileModeHolder value ifTrue:[
self imagePreView tileMode:true tileOffset:(self image extent).
- ]
+ ].
+ self imagePreView image:self image.
! !
!ImageEditor methodsFor:'queries'!
@@ -3575,13 +3577,18 @@
"interactive Hue/Light/Saturation editing"
|bindings hueShift lightValue saturationValue originalColormap firstChange acceptChannel
- shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema|
+ shiftAction avgColorHolder avgColor shiftedColor shiftProcess readySema
+ originalPixels p|
"/ compute the averageColor in the background (while asking user)
readySema := Semaphore new.
[
- originalColormap := imageEditView image colorMap copy.
- avgColor := imageEditView image averageColor.
+ |image|
+
+ image := imageEditView image.
+ originalColormap := image colorMap copy.
+ avgColor := image averageColor.
+ originalPixels := image bits.
readySema signal.
] forkAt:7.
@@ -3624,9 +3631,12 @@
[
imageEditView image
colorMap:originalColormap copy;
+ bits:originalPixels copy;
+ release;
colorMapProcessing:[:clr | shiftedColor value:clr value:hShift value:lFactor value:sFactor].
self updateImage.
self updateInfoLabel.
+ self updateImagePreView.
] ensure:[ shiftProcess := nil ].
] forkAt:7.
].
@@ -3650,7 +3660,12 @@
imageEditView undo
]
].
- self updateImage
+
+ (p := shiftProcess) notNil ifTrue:[
+ p waitUntilTerminated.
+ ].
+ self updateImage.
+ self updateImagePreView.
!
clearMaskedPixels