svn commit: r15689 - trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-09-09 10:45:05-0700
New Revision: 15689

Modified:
   trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java

Log:
RESOLVED - task 5387: Fix range checking for zoom range
http://argouml.tigris.org/issues/show_bug.cgi?id=5387

Modified: trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java?view=diff&rev=15689&p1=trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java&p2=trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java&r1=15688&r2=15689
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/ui/cmd/ZoomActionProxy.java	2008-09-09 10:45:05-0700
@@ -40,7 +40,7 @@
 public class ZoomActionProxy extends ZoomAction {
 
     /**
-     * Local instance of the magnitude that alows computation of zoom factor
+     * Local instance of the magnitude that allows computation of zoom factor
      * before zooming.
      */
     private double zoomFactor;
@@ -61,15 +61,18 @@
      * @param arg0 The action event to be transmitted.
      * @see org.tigris.gef.base.ZoomAction#actionPerformed(java.awt.event.ActionEvent)
      */
+    @Override
     public void actionPerformed(ActionEvent arg0) {
         Editor ed = Globals.curEditor();
-        if (ed == null) return;
+        if (ed == null) {
+            return;
+        }
 
         if ((zoomFactor == 0)
                 || ((ed.getScale() * zoomFactor 
-                    < ZoomSliderButton.MINIMUM_ZOOM / 100) 
+                    > ZoomSliderButton.MINIMUM_ZOOM / 100.0) 
                 && ed.getScale() * zoomFactor 
-                    < ZoomSliderButton.MAXIMUM_ZOOM / 100)) {
+                    < ZoomSliderButton.MAXIMUM_ZOOM / 100.0)) {
             super.actionPerformed(arg0);
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.