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 238487 - Odd behavior of SQL table view on text copy
Summary: Odd behavior of SQL table view on text copy
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 239301 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-18 08:29 UTC by Maksim Khramov
Modified: 2014-01-18 12:43 UTC (History)
1 user (show)

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 Maksim Khramov 2013-11-18 08:29:07 UTC
Product Version: NetBeans IDE Dev (Build 201311050001)
Updates: Updates available
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08

Steps to reproduce:

Connect to bundled derby sample database.
Invoke View Data on Customer table.
Apply filter in Matching rows input field to view single line in results table (for ex 'Zed')
Now we see single line
In field Name switch to edit mode and select all text.
Than press Ctrl-C to copy selected text to Clipboard.
The table line is doubled...

If clear filter I see that first line in table wiew the same as line was filtered
Comment 1 Libor Fischmeistr 2013-11-18 09:44:37 UTC
Hello, thanks for the report.

It should be fixed: http://hg.netbeans.org/core-main/rev/ed433706df76

Please verify when it gets into daily build.

Thank you
Comment 2 matthias42 2013-11-18 19:13:17 UTC
Hey, the fix looks correct, please also add the converter for the column index:

                if (tc != null && ks.isOnKeyRelease()) {
                    table.getModel().setValueAt(tc.getText(), 
                            table.convertRowIndexToModel(row), 
                            table.convertColumnIndexToModel(column));
                }

The column index won't match the model index, if columns are hidden via the corner menu.
Comment 3 Libor Fischmeistr 2013-11-19 08:22:58 UTC
Good point Matthias.

The second fix: http://hg.netbeans.org/core-main/rev/8b4b9edc1b40

Thanks
Comment 4 matthias42 2014-01-18 12:43:31 UTC
*** Bug 239301 has been marked as a duplicate of this bug. ***