pawelsalawa / sqlitestudio

A free, open source, multi-platform SQLite database manager.
https://sqlitestudio.pl
Other
4.67k stars 571 forks source link

Selecting foreign key in grid view #5082

Closed marcpley closed 1 week ago

marcpley commented 3 weeks ago

Details

Keyboard selecting a value for column with foreign key constrain CAM01735r The windows opens on first row, not on the typed value.

Steps to reproduce

Browse table with a column with foreign key. Focus a cell in the column with foreign key. Type the beginning of a valid value with keyboard. Auto-completion works. Use up or down key to select the previous or next value > first row of the foreign key table. If using the mouse to open the grid view with foreign key table > same problem, it is focused on first row.

Operating system

Linux mint 20.1

SQLiteStudio version

3.4.4

marcpley commented 1 week ago

sqlqueryitemdelegate.cpp line 335 cb->setValue(item->getValue()); The combo get the value in the DB (item is SqlQueryItem). To get the user entry, in the grid view, needs to access the focused cell of the grid. It should be possible via the parent, but I don't know how...

pawelsalawa commented 1 week ago

I've made several improvements to cell editing code, which seems to have fixed this issue too.