focused item rewritten

This commit is contained in:
Radek Davidek 2026-02-10 18:56:39 +01:00
parent 5855c0ea7f
commit 07a315ee1b
2 changed files with 2 additions and 5 deletions

View File

@ -228,7 +228,6 @@ public class FilePanel extends JPanel {
FilePanelTab tab = getCurrentTab();
if (tab != null) {
tab.getFileTable().requestFocusInWindow();
tab.selectLastItem();
}
}
});

View File

@ -390,8 +390,7 @@ public class FilePanelTab extends JPanel {
}
if (!selected) {
// Clicked on empty area (row < 0 or empty cell in BRIEF): select the last item in the panel
selectLastItem();
// Clicked on empty area (row < 0 or empty cell in BRIEF): focus is requested but selection stays where it was
}
repaint();
updateStatus();
@ -515,8 +514,7 @@ public class FilePanelTab extends JPanel {
}
if (!selected) {
// Clicked on empty area of the table: select the last item
selectLastItem();
// Clicked on empty area of the table: focus is requested but selection stays where it was
// For empty area, we MUST consume the event to prevent JTable from clearing selection
e.consume();
return;