Merge remote-tracking branch 'origin/5.5'
[scilab.git] / scilab / modules / gui / src / java / org / scilab / modules / gui / SwingView.java
index 10f0d27..72dd04f 100644 (file)
@@ -130,7 +130,6 @@ import org.scilab.modules.gui.bridge.uitable.SwingScilabUiTable;
 import org.scilab.modules.gui.bridge.waitbar.SwingScilabWaitBar;
 import org.scilab.modules.gui.bridge.window.SwingScilabWindow;
 import org.scilab.modules.gui.console.ScilabConsole;
-import org.scilab.modules.gui.frame.SimpleFrame;
 import org.scilab.modules.gui.ged.Inspector;
 import org.scilab.modules.gui.menubar.MenuBar;
 import org.scilab.modules.gui.menubar.ScilabMenuBar;
@@ -725,8 +724,14 @@ public final class SwingView implements GraphicView {
                     bar.close();
                     break;
                 case Frame:
-                    SimpleFrame frame = (SimpleFrame) requestedObject.getValue();
-                    frame.destroy();
+                    Boolean scrollable = (Boolean) GraphicController.getController().getProperty(id, __GO_UI_SCROLLABLE__);
+                    if (scrollable) {
+                        SwingScilabScrollableFrame frame = (SwingScilabScrollableFrame) requestedObject.getValue();
+                        frame.destroy();
+                    } else {
+                        SwingScilabFrame frame = (SwingScilabFrame) requestedObject.getValue();
+                        frame.destroy();
+                    }
                     break;
                 default:
                     // Nothing to do