--- a/ImageView.st Wed Jan 11 11:12:41 2017 +0100
+++ b/ImageView.st Mon Jan 16 17:02:43 2017 +0100
@@ -334,19 +334,22 @@
!
image:anImage
- "set the image"
+ "set the image scrolls as set by adjust
+ - may show a wait cursor, if image dithering may take a while"
self image:anImage scroll:true
!
image:anImage scroll:doScroll
- "set the image - show a wait cursor, since image dithering may take a while"
+ "set the image possibly scroll as set by adjust
+ - may show a wait cursor, if image dithering may take a while"
self setImage:anImage scroll:doScroll
!
image:anImage scroll:doScroll invalidate:doInvalidate
- "set the image - show a wait cursor, since image dithering may take a while"
+ "set the image possibly scroll as set by adjust
+ - may show a wait cursor, if image dithering may take a while"
self setImage:anImage scroll:doScroll invalidate:doInvalidate
!
@@ -361,16 +364,18 @@
!
magnificationFactor:aNumber
- magnificationFactor := aNumber.
-"/ magnificationFactor fractionPart < 0.1 ifTrue:[
-"/ "magnifying by integer factor is faster"
-"/ magnificationFactor := magnificationFactor truncated.
-"/ ].
- magnifiedImage := nil.
- magnificationFactor = 1 ifTrue:[
- self contentsChanged.
- ].
- self invalidate.
+ magnificationFactor ~= aNumber ifTrue:[
+ magnificationFactor := aNumber.
+ "/ magnificationFactor fractionPart < 0.1 ifTrue:[
+ "/ "magnifying by integer factor is faster"
+ "/ magnificationFactor := magnificationFactor truncated.
+ "/ ].
+ magnifiedImage := nil.
+ magnificationFactor = 1 ifTrue:[
+ self contentsChanged.
+ ].
+ self invalidate.
+ ].
!
model:aValueHolder
@@ -389,13 +394,13 @@
!
setImage:anImage scroll:doScroll
- "set the image - show a wait cursor, since image dithering may take a while"
+ "set the image - may show a wait cursor, if image dithering may take a while"
self setImage:anImage scroll:doScroll invalidate:true
!
setImage:anImage scroll:doScroll invalidate:doInvalidate
- "set the image - show a wait cursor, since image dithering may take a while"
+ "set the image - may show a wait cursor, if image dithering may take a while"
|oldSize newSize newImageIsSmaller|