GUI: fixed wrong clicks from additional mouse buttons (now only left clicks are allowed, closes #11455)

This commit is contained in:
Oleg Agafonov 2023-11-23 09:23:01 +04:00
parent 75958e3710
commit a0ed89035f
17 changed files with 82 additions and 21 deletions

View file

@ -580,6 +580,9 @@ public class TablesPanel extends javax.swing.JPanel {
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (!SwingUtilities.isLeftMouseButton(e)) {
return;
}
int modelRow = TablesUtil.getSelectedModelRow(table);
if (e.getClickCount() == 2 && modelRow != -1) {
action.actionPerformed(new ActionEvent(table, ActionEvent.ACTION_PERFORMED, TablesUtil.getSearchIdFromTable(table, modelRow)));