|
@@ -2040,16 +2040,18 @@ public class GUI<E> implements CategoryListener {
|
|
|
tabbedPaneInnerOriginal.setSelectedComponent(tabbedPaneInnerOriginal.getComponentAt(i));
|
|
|
}
|
|
|
|
|
|
- if (tabbedPaneSplit.getComponentCount() > 0) {
|
|
|
+ if (tabbedPaneSplit.getTabCount() > 0) {
|
|
|
JTabbedPane tabbedPaneInnerSplit = (JTabbedPane) tabbedPaneSplit.getComponentAt(0);
|
|
|
- JScrollPane paneSplit = (JScrollPane) tabbedPaneInnerSplit.getComponentAt(i);
|
|
|
- if (!initSplit && paneSplit != null
|
|
|
- && ((UpperNodeCanvas) paneSplit.getViewport().getComponent(0)).upperNode.getId() == temp.getId()) {
|
|
|
- dupl = true;
|
|
|
- // set selected component to view
|
|
|
- tabbedPaneSplit.setSelectedComponent(tabbedPaneInnerSplit);
|
|
|
- // set selected tab in view to found upper-node-canvas
|
|
|
- tabbedPaneInnerSplit.setSelectedComponent(tabbedPaneInnerSplit.getComponentAt(i));
|
|
|
+ if (tabbedPaneInnerSplit != null) {
|
|
|
+ JScrollPane paneSplit = (JScrollPane) tabbedPaneInnerSplit.getComponentAt(i);
|
|
|
+ if (!initSplit && paneSplit != null
|
|
|
+ && ((UpperNodeCanvas) paneSplit.getViewport().getComponent(0)).upperNode.getId() == temp.getId()) {
|
|
|
+ dupl = true;
|
|
|
+ // set selected component to view
|
|
|
+ tabbedPaneSplit.setSelectedComponent(tabbedPaneInnerSplit);
|
|
|
+ // set selected tab in view to found upper-node-canvas
|
|
|
+ tabbedPaneInnerSplit.setSelectedComponent(tabbedPaneInnerSplit.getComponentAt(i));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|