[hg] main-silver: #156555: "Remove" button is still enabled afte...

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #156555: "Remove" button is still enabled afte...
  • Date: Wed, 30 Jan 2013 10:27:51 -0800

changeset 1e7705050005 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/1e7705050005
description:
        #156555: "Remove" button is still enabled after unselecting of a 
record

diffstat:

 db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java 
|  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff --git 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java
 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java
--- 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java
+++ 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java
@@ -274,8 +274,8 @@
             }
 
             if (e.getSource() == table.getSelectionModel() && 
table.getRowSelectionAllowed()) {
-                int first = e.getFirstIndex();
-                if (first >= 0 && tablePanel.isEditable()) {
+                boolean rowSelected = table.getSelectedRows().length > 0;
+                if (rowSelected && tablePanel.isEditable()) {
                     tablePanel.enableDeleteBtn(true);
                 } else {
                     tablePanel.enableDeleteBtn(false);

[hg] main-silver: #156555: "Remove" button is still enabled afte...

Jaroslav Havlin 01/30/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close