From 63ef1879700ba7bae45cfa11c2fb4869d1d0b487 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Mon, 31 Aug 2015 11:10:31 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 41c5851..015f6f0 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -692,10 +692,13 @@ public class TestingList extends Panel { if (this.jTable1.isEnabled()) { if(evt.getButton() == java.awt.event.MouseEvent.BUTTON3){ //right mouse click + //select row with right-click only if previously only one or zero rows were selected + if(jTable1.getSelectedRowCount()<2){ + Point cursor = evt.getPoint(); + int rowAtPoint = jTable1.rowAtPoint(cursor); + jTable1.setRowSelectionInterval(rowAtPoint, rowAtPoint); + } //enable action Show Test Details only if one row is selected - Point cursor = evt.getPoint(); - int rowAtPoint = jTable1.rowAtPoint(cursor); - jTable1.setRowSelectionInterval(rowAtPoint, rowAtPoint); this.jMenuItemShowDetails.setEnabled(jTable1.getSelectedRows().length == 1); jPopupMenuTable.show(jTable1, evt.getX(), evt.getY()); }