Merge lp:~tapaal-contributor/tapaal/slowComponentSorting into lp:tapaal/2.1

Proposed by Mathias Grund Sørensen
Status: Merged
Merge reported by: Jiri Srba
Merged at revision: not available
Proposed branch: lp:~tapaal-contributor/tapaal/slowComponentSorting
Merge into: lp:tapaal/2.1
Diff against target: 27 lines (+8/-2)
1 file modified
src/dk/aau/cs/gui/TemplateExplorer.java (+8/-2)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/slowComponentSorting
Reviewer Review Type Date Requested Status
Kenneth Yrke Jørgensen Approve
Jiri Srba Approve
Review via email: mp+113235@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) :
review: Approve
Revision history for this message
Kenneth Yrke Jørgensen (yrke) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dk/aau/cs/gui/TemplateExplorer.java'
2--- src/dk/aau/cs/gui/TemplateExplorer.java 2012-03-07 11:17:45 +0000
3+++ src/dk/aau/cs/gui/TemplateExplorer.java 2012-07-03 15:13:39 +0000
4@@ -206,7 +206,10 @@
5
6 if(index > 0) {
7 parent.swapTemplates(index, index-1);
8- updateTemplateList();
9+ Object o = listModel.getElementAt(index);
10+ listModel.setElementAt(listModel.getElementAt(index-1), index);
11+ listModel.setElementAt(o, index-1);
12+ templateList.ensureIndexIsVisible(index+1);
13 templateList.setSelectedIndex(index-1);
14 }
15 }
16@@ -227,7 +230,10 @@
17
18 if(index < parent.network().allTemplates().size() - 1) {
19 parent.swapTemplates(index, index+1);
20- updateTemplateList();
21+ Object o = listModel.getElementAt(index);
22+ listModel.setElementAt(listModel.getElementAt(index+1), index);
23+ listModel.setElementAt(o, index+1);
24+ templateList.ensureIndexIsVisible(index+1);
25 templateList.setSelectedIndex(index+1);
26 }
27 }

Subscribers

People subscribed via source and target branches