Merge lp:~yrke/tapaal/DeleteAction-removeselectionmanager-deleteSelection into lp:tapaal

Proposed by Kenneth Yrke Jørgensen
Status: Merged
Approved by: Kenneth Yrke Jørgensen
Approved revision: 1004
Merged at revision: 989
Proposed branch: lp:~yrke/tapaal/DeleteAction-removeselectionmanager-deleteSelection
Merge into: lp:tapaal
Prerequisite: lp:~yrke/tapaal/placetransitionobjecthandler-refactor
Diff against target: 33 lines (+0/-12)
2 files modified
src/pipe/gui/GuiFrame.java (+0/-1)
src/pipe/gui/SelectionManager.java (+0/-11)
To merge this branch: bzr merge lp:~yrke/tapaal/DeleteAction-removeselectionmanager-deleteSelection
Reviewer Review Type Date Requested Status
TAPAAL Reviewers Pending
Review via email: mp+355534@code.launchpad.net

Commit message

Removed method deleteSelection from selection manager

The function seems to be redundent with the seleteSelection in
undo manager. Also using this implementation only will break delete.
Seems like old code that has been forgotten

Description of the change

This change needs the following branch lp:~yrke/tapaal/placetransitionobjecthandler-refactor

Needs testing of the delete method, herunder the effect on saving and loading nets with stuff deleted.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pipe/gui/GuiFrame.java'
2--- src/pipe/gui/GuiFrame.java 2018-08-13 09:38:20 +0000
3+++ src/pipe/gui/GuiFrame.java 2018-09-24 11:39:11 +0000
4@@ -542,7 +542,6 @@
5 }
6
7 appView.getUndoManager().deleteSelection(appView.getSelectionObject().getSelection());
8- appView.getSelectionObject().deleteSelection();
9 appView.repaint();
10 CreateGui.getCurrentTab().network().buildConstraints();
11 }
12
13=== modified file 'src/pipe/gui/SelectionManager.java'
14--- src/pipe/gui/SelectionManager.java 2018-04-11 23:20:44 +0000
15+++ src/pipe/gui/SelectionManager.java 2018-09-24 11:39:11 +0000
16@@ -91,17 +91,6 @@
17 g2d.draw(selectionRectangle);
18 }
19
20- public void deleteSelection() {
21- // Get all the objects in the current window
22- ArrayList<PetriNetObject> pnObjects = drawingSurface.getPNObjects();
23- for (int i = 0; i < pnObjects.size(); i++) {
24- if (pnObjects.get(i).isSelected()) {
25- pnObjects.get(i).delete();
26- }
27- }
28- drawingSurface.updatePreferredSize();
29- }
30-
31 public void clearSelection() {
32 // Get all the objects in the current window
33 ArrayList<PetriNetObject> pnObjects = drawingSurface.getPNObjects();

Subscribers

People subscribed via source and target branches