Bug #50113 right click menu acts on Last selected item instead of item under cursor
Submitted: 6 Jan 2010 19:29 Modified: 16 Apr 2010 13:23
Reporter: Edward Rudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.11 OS:Linux (Fedora 12 x86_64)
Assigned to: Alfredo Kojima CPU Architecture:Any

[6 Jan 2010 19:29] Edward Rudd
Description:
Using Edit mode (EDIT db.MyTable) I will sometimes need to set a field to null OR delete a row.   So I right click and choose the set to null or delete row options.

Which most of the time seem to work fine, but every now and then they don't seem to work..  And I recently found out WHY they don't "Seem" to work.  the options affect the "LAST" entry I selected (column field or row) instead of the item under my mouse cursor.   So if I happen to select a row and scroll down a page or two and say "oh I don't want that row" right click and delete.. it deletes the row two pages up that I previously selected and can not see any more (as it gets immediately removed from view instead of MARKED as query browser did, I'll file another bug on that one)

How to repeat:
scenario 1

1) create a random 4 column table..
2) insert about 10 rows.
3) EDIT table
4) select Column 1 Row 1
5) right click over colum 2 row 3 and choose "Set to null" C1R1 is updated instead of C2R3.

scenario 2
1) create random table
2) insert about 20-30 rows (enough to cause a scrollbar in edit mode)
3) EDIT table
4) select first row
5) scroll down so first row is off screen
6) right click on row toward bottom and choose remove row.

the FIRST row (out of view) is removed INSTEAD of the on under the cursor.

Suggested fix:
Change the interface to select and act on the cell/row UNDER the cursor as it is more consistent and obvious what is going to happen. Instead of having to remember what row/cell was selected (that could be out of view)
[7 Jan 2010 11:10] Johannes Taxacher
we'd make right-click first select the row/cell under cursor
[14 Jan 2010 9:34] Susanne Ebrecht
Many thanks for writing a feature request.

We will discuss this.
[24 Feb 2010 0:27] Alfredo Kojima
This has been fixed.
[12 Apr 2010 21:19] Johannes Taxacher
fix confirmed in repository
[16 Apr 2010 13:23] Tony Bedford
An entry has been added to the 5.2.18 changelog:

When editing a table in the SQL Editor, the context sensitive menu items did not affect the row under the cursor, but a previously selected row. This potentially led to the unintentioned deletion of a row.