This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245510 - "Cancel Edits Selected Record(s)" cancels edits to all edited records
Summary: "Cancel Edits Selected Record(s)" cancels edits to all edited records
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2014-07-09 10:40 UTC by rashmidixit
Modified: 2015-02-01 04:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rashmidixit 2014-07-09 10:40:27 UTC
Using build no 201407080001

Here is what I did:
1. Edited a couple of records. 
2. Selected another record which I had last edited.
3. Clicked on "Cancel Edits Selected Record(s)". It undid all the other records which I had edited and not the one I selected.

Expected behaviour:
Only undo changes to the selected record.


The wording of the button is very confusing. According to the words, it should undo changes only to the selected rows. I think the wordings of the button should change.
Comment 1 matthias42 2014-08-12 18:41:11 UTC
This bug refers to the toolbar above the result table (for me this was not clear) - the reporter is right with this comment. For the commit functionality the labels are correct. This is the change needed:


db.dataview/src/org/netbeans/modules/db/dataview/output/Bundle.properties:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -68,6 +68,8 @@
 
 TOOLTIP_cancel_edits=Cancel Edits Selected Record(s)
 
+TOOLTIP_cancel_edits_all=Cancel Edit(s)
+
 TOOLTIP_truncate_table=Truncate Table
 
 TOOLTIP_copy_cell_value=Copy Cell Value

db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewUI.java:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -537,7 +537,7 @@
 
         url = getClass().getResource(imgPrefix + "cancel_edits.png"); // NOI18N
         cancel = new JXButton(new ImageIcon(url));
-        cancel.setToolTipText(NbBundle.getMessage(DataViewUI.class, "TOOLTIP_cancel_edits"));
+        cancel.setToolTipText(NbBundle.getMessage(DataViewUI.class, "TOOLTIP_cancel_edits_all"));
         cancel.addActionListener(outputListener);
         cancel.setEnabled(false);
         processButton(cancel);
Comment 2 matthias42 2015-01-30 20:52:52 UTC
Thank you for your report - the mentioned fix was committed as:

http://hg.netbeans.org/core-main/rev/7475b06c4be6

In the next few days a nightly build will be available, that contains this fix. When this happens a messages will be attached to this bug.

Please check that nightly build and verify the bug fixed. If you agree, that the bug is fixed, please change the status of this bug to VERIFIED. Thank you!
Comment 3 Quality Engineering 2015-02-01 04:04:44 UTC
Integrated into 'main-silver', will be available in build *201502010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7475b06c4be6
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #245510: Correct tooltip for button in dataview, that cancels all open edits