Commit faac414e authored by apvrille's avatar apvrille

Resolving ticket 202 on exception at startup

parent 8792d095
...@@ -251,7 +251,6 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal ...@@ -251,7 +251,6 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal
} }
public void reorderTabs(String tabs, int startIndex) { public void reorderTabs(String tabs, int startIndex) {
TraceManager.addDev("tabs=" + tabs); TraceManager.addDev("tabs=" + tabs);
if (tabs != null) { if (tabs != null) {
String[] splitTabs = tabs.split("\\$"); String[] splitTabs = tabs.split("\\$");
...@@ -291,6 +290,10 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal ...@@ -291,6 +290,10 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal
Color fg = tabbedPane.getForegroundAt(src); Color fg = tabbedPane.getForegroundAt(src);
Color bg = tabbedPane.getBackgroundAt(src); Color bg = tabbedPane.getBackgroundAt(src);
Object o = panels.elementAt(src);
panels.removeElementAt(src);
panels.insertElementAt((TDiagramPanel) o, dst);
// Remove the tab // Remove the tab
tabbedPane.remove(src); tabbedPane.remove(src);
...@@ -304,11 +307,7 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal ...@@ -304,11 +307,7 @@ public abstract class TURTLEPanel implements GenericTree, DraggableTabbedPaneCal
tabbedPane.setDisplayedMnemonicIndexAt(dst, mnemonicLoc); tabbedPane.setDisplayedMnemonicIndexAt(dst, mnemonicLoc);
tabbedPane.setForegroundAt(dst, fg); tabbedPane.setForegroundAt(dst, fg);
tabbedPane.setBackgroundAt(dst, bg); tabbedPane.setBackgroundAt(dst, bg);
Object o = panels.elementAt(src);
panels.removeElementAt(src);
panels.insertElementAt((TDiagramPanel) o, dst);
tabbedPane.setSelectedIndex(dst); tabbedPane.setSelectedIndex(dst);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment