svn commit: r12789 - trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-06-08 00:53:47-0700
New Revision: 12789

Modified:
   trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java

Log:
Add guard for ClassCastException and TODO for investigation

Modified: trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java?view=diff&rev=12789&p1=trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java&p2=trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java&r1=12788&r2=12789
==============================================================================
--- trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java	(original)
+++ trunk/src_new/org/argouml/ui/StylePanelFigNodeModelElement.java	2007-06-08 00:53:47-0700
@@ -101,8 +101,12 @@
         refreshTransaction = true;
         // Let the parent do its refresh.
         super.refresh();
-        PathContainer pc = (PathContainer) getPanelTarget();
-        pathCheckBox.setSelected(pc.isPathVisible());
+        Object target = getPanelTarget();
+        // TODO: Why is this code even getting called for a FigGeneralization?
+        if (target instanceof PathContainer) {
+            PathContainer pc = (PathContainer) getPanelTarget();
+            pathCheckBox.setSelected(pc.isPathVisible());
+        }
         refreshTransaction = false;
 
         // lets redraw the box
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.