Oups, revert useless changes sorry.
Jean-baptiste Silvy [Mon, 18 Aug 2008 14:19:42 +0000 (14:19 +0000)]
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/window/SwingScilabWindow.java

index 5ea3468..66b8a41 100644 (file)
@@ -236,27 +236,22 @@ public class SwingScilabWindow extends JFrame implements SimpleWindow {
         * @see org.scilab.modules.gui.window.Window#removeTab(org.scilab.modules.gui.tab.Tab)
         */
        public void removeTab(Tab tab) {
-               try {
-                       DockingManager.close(((SwingScilabTab) tab.getAsSimpleTab()));
-                       ((SwingScilabTab) tab.getAsSimpleTab()).close();
-                       if (getDockingPort().getDockables().isEmpty()) {
-                               if (toolBar != null) {
-                                       UIElementMapper.removeMapping(toolBar.getElementId());
-                               }
-                               if (menuBar != null) {
-                                       UIElementMapper.removeMapping(menuBar.getElementId());
-                               }
-                               addMenuBar(null);
-                               addToolBar(null);
-                               addInfoBar(null);
-                               UIElementMapper.removeMapping(this.elementId);
-                               
-                               this.removeAll();
-                               this.dispose();
+               DockingManager.close(((SwingScilabTab) tab.getAsSimpleTab()));
+               ((SwingScilabTab) tab.getAsSimpleTab()).close();
+               if (getDockingPort().getDockables().isEmpty()) {
+                       if (toolBar != null) {
+                               UIElementMapper.removeMapping(toolBar.getElementId());
                        }
-               }
-               catch (Exception e) {
-                       e.printStackTrace();
+                       if (menuBar != null) {
+                               UIElementMapper.removeMapping(menuBar.getElementId());
+                       }
+                       addMenuBar(null);
+                       addToolBar(null);
+                       addInfoBar(null);
+                       UIElementMapper.removeMapping(this.elementId);
+                       
+                       this.removeAll();
+                       this.dispose();
                }
        }