Skip to content

Commit b14be8f

Browse files
committed
Fix bugs
1 parent 5be67bd commit b14be8f

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

src/script/InterpreterConstructActions.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,7 @@ private void addLineSegment(LineSegment lineSegment) {
111111
// change selection
112112
panel.getSelectTool().clearSelection();
113113
panel.getSelectTool().selectComponent(lineSegment);
114-
// push action to the manager
115-
SharedUndoRedoActionManager.getSharedInstance().pushUndoableAction(
116-
new UndoRedoableInterface() {
117-
118-
@Override
119-
public void undoAction() {
120-
lineSegment.remove(panel);
121-
panel.repaint();
122-
}
123-
124-
@Override
125-
public void redoAction() {
126-
panel.addPaintComponent(lineSegment);
127-
panel.repaint();
128-
}
129-
});
114+
130115
panel.repaint();
131116
}
132117
}

src/ui/helper/historyui/undoredoLog/UndoredoUITest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,19 @@ public void run() {
4242
undoredoLog.setVisible(true);
4343
undoredoLog.setSize(new Dimension(500, 400));
4444

45+
try {
46+
Thread.sleep(2000);
47+
} catch (InterruptedException e) {
48+
// TODO Auto-generated catch block
49+
e.printStackTrace();
50+
}
51+
undoredoLog.dispose();
52+
53+
4554

4655
}
4756
});
48-
Thread.sleep(Long.MAX_VALUE);
57+
Thread.sleep(5000);
4958
}
5059

5160

0 commit comments

Comments
 (0)