ImageView.st
changeset 5741 75e825820538
parent 5721 601f7686ccdb
child 5751 1382b5b74d06
--- a/ImageView.st	Sun Apr 29 17:08:12 2018 +0200
+++ b/ImageView.st	Mon Apr 30 21:45:58 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -647,13 +649,8 @@
 generateMagnifiedImage
     |adj smooth doFit innerWidth innerHeight imgWidth imgHeight|
 
-    image isNil ifTrue:[
-        ^ self
-    ].
-
-    smoothMagnifiedImage notNil ifTrue:[
-        ^ self
-    ].
+    image isNil ifTrue:[^ self].
+    smoothMagnifiedImage notNil ifTrue:[^ self].
     
     adj := adjust.
     smooth := false.
@@ -747,10 +744,10 @@
 redrawX:x y:y width:w height:h
     |xI yI depth shownImage imgWidth imgHeight right bott "rectRight rectBelow"|
 
-    image notNil ifTrue:[
-        self generateMagnifiedImage.
+    self generateMagnifiedImage.
 
-        shownImage := smoothMagnifiedImage ? magnifiedImage ? image.
+    shownImage := smoothMagnifiedImage ? magnifiedImage ? image.
+    shownImage notNil ifTrue:[
         imgWidth := shownImage width.
         imgHeight := shownImage height.