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
=== modified file 'src/dk/aau/cs/gui/TemplateExplorer.java'
--- src/dk/aau/cs/gui/TemplateExplorer.java 2012-03-07 11:17:45 +0000
+++ src/dk/aau/cs/gui/TemplateExplorer.java 2012-07-03 15:13:39 +0000
@@ -206,7 +206,10 @@
206 206
207 if(index > 0) {207 if(index > 0) {
208 parent.swapTemplates(index, index-1);208 parent.swapTemplates(index, index-1);
209 updateTemplateList();209 Object o = listModel.getElementAt(index);
210 listModel.setElementAt(listModel.getElementAt(index-1), index);
211 listModel.setElementAt(o, index-1);
212 templateList.ensureIndexIsVisible(index+1);
210 templateList.setSelectedIndex(index-1);213 templateList.setSelectedIndex(index-1);
211 }214 }
212 }215 }
@@ -227,7 +230,10 @@
227 230
228 if(index < parent.network().allTemplates().size() - 1) {231 if(index < parent.network().allTemplates().size() - 1) {
229 parent.swapTemplates(index, index+1);232 parent.swapTemplates(index, index+1);
230 updateTemplateList();233 Object o = listModel.getElementAt(index);
234 listModel.setElementAt(listModel.getElementAt(index+1), index);
235 listModel.setElementAt(o, index+1);
236 templateList.ensureIndexIsVisible(index+1);
231 templateList.setSelectedIndex(index+1);237 templateList.setSelectedIndex(index+1);
232 }238 }
233 }239 }

Subscribers

People subscribed via source and target branches