Browse Source

uppernodes können wieder geöffnet werden

Kevin Trometer 7 years ago
parent
commit
10f9081587
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/ui/view/GUI.java

+ 5 - 5
src/ui/view/GUI.java

@@ -442,7 +442,7 @@ public class GUI<E> implements CategoryListener {
 							controller.delObjUpperNode(cps, uNC.upperNode);
 							// Remove UpperNodeTab if UpperNode deleted
 							if (cps instanceof CpsUpperNode) {
-								for (int i = 3; i < tabbedPane.getTabCount(); i++) {
+								for (int i = 4; i < tabbedPane.getTabCount(); i++) {
 									if (((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponentAt(i)).getViewport()
 											.getComponent(0)).upperNode.getId() == cps.getId()) {
 										tabbedPane.remove(i);
@@ -465,7 +465,7 @@ public class GUI<E> implements CategoryListener {
 						controller.delCanvasObject(cps, save);
 						// Remove UpperNodeTab if UpperNode deleted
 						if (cps instanceof CpsUpperNode) {
-							for (int i = 3; i < tabbedPane.getTabCount(); i++) {
+							for (int i = 4; i < tabbedPane.getTabCount(); i++) {
 								if (((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponentAt(i)).getViewport()
 										.getComponent(0)).upperNode.getId() == cps.getId()) {
 									tabbedPane.remove(i);
@@ -673,7 +673,7 @@ public class GUI<E> implements CategoryListener {
 				JOptionPane.showMessageDialog(null, myPanel);
 				controller.setCanvasX(Integer.parseInt(field1.getText()));
 				controller.setCanvasY(Integer.parseInt(field2.getText()));
-				for (int i = 3; i < tabbedPane.getTabCount(); i++) {
+				for (int i = 4; i < tabbedPane.getTabCount(); i++) {
 					tabbedPane.getComponentAt(i)
 							.setPreferredSize(new Dimension(model.getCanvasX(), model.getCanvasY()));
 					tabbedPane.getComponentAt(i).repaint();
@@ -1071,7 +1071,7 @@ public class GUI<E> implements CategoryListener {
 						}
 						updCon.getActualCps().setName(temp.toString());
 						if (updCon.getActualCps() instanceof CpsUpperNode) {
-							for (int index = 3; index < tabbedPane.getTabCount(); index++) {
+							for (int index = 4; index < tabbedPane.getTabCount(); index++) {
 								UpperNodeCanvas unc = ((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponent(index))
 										.getViewport().getComponent(0));
 								if (unc.upperNode.getId() == updCon.getActualCps().getId()) {
@@ -2025,7 +2025,7 @@ public class GUI<E> implements CategoryListener {
 
 		// check if tab already open for clicked NodeOfNode
 		boolean dupl = false;
-		for (int i = 3; i < tabbedPane.getTabCount() && dupl == false; i++) {
+		for (int i = 4; i < tabbedPane.getTabCount() && dupl == false; i++) {
 			if (((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponentAt(i)).getViewport().getComponent(0)).upperNode
 					.getId() == temp.getId()) {
 				dupl = true;