Xcos: remove block default values
[scilab.git] / scilab / modules / xcos / src / java / org / scilab / modules / xcos / block / actions / EditBlockFormatAction.java
index 7f467ca..e7cf3bd 100644 (file)
@@ -100,7 +100,7 @@ public class EditBlockFormatAction extends DefaultAction {
                /*
                 * Create and show the dialog
                 */
-               EditFormatDialog dialog = createDialog(selectedCell, (Frame) window);
+               EditFormatDialog dialog = createDialog(selectedCell, window);
                dialog.setName(name);
                dialog.setVisible(true);
        }
@@ -166,11 +166,11 @@ public class EditBlockFormatAction extends DefaultAction {
                        textColor = mxUtils.parseColor(working);
                }
                
-               working = (String) selectedCell.getValue();
-               if (working == null) {
+               Object current = selectedCell.getValue();
+               if (current == null) {
                        text = "";
                } else {
-                       text = mxUtils.getBodyMarkup(working, false);
+                       text = mxUtils.getBodyMarkup(current.toString(), false);
                }
                
                EditFormatDialog dialog = new EditFormatDialog(window);