From 7015fbd868d211e5688723e0de9efe933fcb5596 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 24 May 2008 21:57:11 +0000 Subject: Bugfix --- sources/simulator/VSSimulator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sources/simulator/VSSimulator.java') diff --git a/sources/simulator/VSSimulator.java b/sources/simulator/VSSimulator.java index 097d198..1422d4b 100644 --- a/sources/simulator/VSSimulator.java +++ b/sources/simulator/VSSimulator.java @@ -881,10 +881,8 @@ public class VSSimulator extends JPanel { } public void removeProcessAtIndex(int index) { - if (lastSelectedProcessNum >= index) + if (lastSelectedProcessNum > index) --lastSelectedProcessNum; - if (lastSelectedProcessNum < 0) - lastSelectedProcessNum = 0; globalTextFields.remove(index); localTextFields.remove(index); @@ -894,6 +892,8 @@ public class VSSimulator extends JPanel { processesComboBox.removeItemAt(index); simulatorFrame.updateEditMenu(); + + updateTaskManagerTable(); } public void addProcessAtIndex(int index) { @@ -920,7 +920,7 @@ public class VSSimulator extends JPanel { tabbedPane.remove(localPanel); tabbedPane.insertTab(prefs.getString("lang.events"), null, splitPane1, null, 0); splitPane1.setTopComponent(localPanel); - splitPane1.setDividerLocation((int) (getPaintSize()/2) - 20); + //splitPane1.setDividerLocation((int) (getPaintSize()/2) - 20); /* addPanel */ localAddPanel.add(localPIDComboBox, 2); @@ -932,6 +932,7 @@ public class VSSimulator extends JPanel { /* addPanel */ localAddPanel.remove(2); } + tabbedPane.setSelectedIndex(selectedIndex); /* Update the 'Variables tab' */ -- cgit v1.2.3