You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2008/05/31 13:43:54 UTC

svn commit: r662008 - /xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java

Author: cam
Date: Sat May 31 04:43:54 2008
New Revision: 662008

URL: http://svn.apache.org/viewvc?rev=662008&view=rev
Log:
No need to check for open JSVGViewerFrames, since at least one will always
be open.

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java?rev=662008&r1=662007&r2=662008&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/Main.java Sat May 31 04:43:54 2008
@@ -297,9 +297,7 @@
                         String name = method.getName();
                         if (name.equals("handleAbout")) {
                             JSVGViewerFrame relativeTo =
-                                viewerFrames.isEmpty()
-                                    ?  null
-                                    : (JSVGViewerFrame) viewerFrames.get(0);
+                                (JSVGViewerFrame) viewerFrames.get(0);
                             AboutDialog dlg = new AboutDialog(relativeTo);
                             // Work around pack() bug on some platforms
                             dlg.setSize(dlg.getPreferredSize());
@@ -308,9 +306,7 @@
                             dlg.toFront();
                         } else if (name.equals("handlePreferences")) {
                             JSVGViewerFrame relativeTo =
-                                viewerFrames.isEmpty()
-                                    ?  null
-                                    : (JSVGViewerFrame) viewerFrames.get(0);
+                                (JSVGViewerFrame) viewerFrames.get(0);
                             showPreferenceDialog(relativeTo);
                         } else if (name.equals("handleQuit")) {
                             // Do nothing, let the OS quit the app.