[hg] main-silver: #231344: TS 70 DB Sanity test fails

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: #231344: TS 70 DB Sanity test fails
  • Date: Mon, 17 Jun 2013 19:59:54 -0700

changeset 35092ef90942 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/35092ef90942
description:
        #231344: TS 70 DB Sanity test fails

diffstat:

 db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUI.java 
|   2 +-
 db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java      
|  13 ++++-----
 2 files changed, 7 insertions(+), 8 deletions(-)

diffs (35 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
@@ -309,7 +309,7 @@
             if (e.getSource() == table.getSelectionModel() && 
table.getRowSelectionAllowed()) {
                 boolean rowSelected = table.getSelectedRows().length > 0;
                 if (rowSelected && getModel().isEditable()) {
-                    dataviewUI.enableDeleteBtn(true);
+                    dataviewUI.enableDeleteBtn(!dataviewUI.isDirty());
                 } else {
                     dataviewUI.enableDeleteBtn(false);
                 }
diff --git 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java
--- a/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java
+++ b/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java
@@ -184,13 +184,12 @@
     }
 
     void handleColumnUpdated() {
-        if (dataPanel.getModel().hasUpdates()) {
-            commit.setEnabled(true);
-            cancel.setEnabled(true);
-        } else {
-            commit.setEnabled(false);
-            cancel.setEnabled(false);
-        }
+        boolean editMode = dataPanel.getModel().hasUpdates();
+        commit.setEnabled(editMode);
+        cancel.setEnabled(editMode);
+        insert.setEnabled(!editMode);
+        deleteRow.setEnabled(!editMode);
+        truncateButton.setEnabled(!editMode);
     }
 
     JButton[] getEditButtons() {

[hg] main-silver: #231344: TS 70 DB Sanity test fails

Jaroslav Havlin 06/18/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