diff options
| author | Paul Buetow <paul@buetow.org> | 2008-06-13 18:47:32 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-06-13 18:47:32 +0000 |
| commit | ecbc5fd1e3292cc1d21fa83011699bc400636fec (patch) | |
| tree | 215d308d9859a704a1df896fa6808e2445852aff /sources/simulator | |
| parent | 8b58d22373ed1c46f9e87943ee2d4e0c30728e6a (diff) | |
multi row deletion works
Diffstat (limited to 'sources/simulator')
| -rw-r--r-- | sources/simulator/VSSimulator.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/simulator/VSSimulator.java b/sources/simulator/VSSimulator.java index 49079a3..ac7588a 100644 --- a/sources/simulator/VSSimulator.java +++ b/sources/simulator/VSSimulator.java @@ -328,7 +328,7 @@ public class VSSimulator extends JPanel implements VSSerializable { * java.awt.event.MouseEvent) */ public void mouseClicked(MouseEvent me) { - JTable source = (JTable) me.getSource(); + final JTable source = (JTable) me.getSource(); final int row = source.rowAtPoint(me.getPoint()); final int col = source.columnAtPoint(me.getPoint()); @@ -336,8 +336,10 @@ public class VSSimulator extends JPanel implements VSSerializable { ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent ae) { String command = ae.getActionCommand(); + int rows[] = source.getSelectedRows(); if (command.equals(prefs.getString("lang.remove"))) { - removeTaskAtRow(row); + for (int i = rows.length - 1; i >= 0; --i) + removeTaskAtRow(rows[i]); } } }; |
