double click fix
This commit is contained in:
parent
d15f1544d1
commit
a3f97f9369
@ -57,7 +57,7 @@ public class DriveSelector extends JDialog {
|
||||
driveList.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(java.awt.event.MouseEvent e) {
|
||||
if (e.getClickCount() == 2) {
|
||||
if (e.getClickCount() >= 2 && e.getClickCount() % 2 == 0) {
|
||||
int index = driveList.locationToIndex(e.getPoint());
|
||||
if (index >= 0) {
|
||||
selectedDrive = drives.get(index).getRoot();
|
||||
|
||||
@ -302,7 +302,7 @@ public class FilePanelTab extends JPanel {
|
||||
// Single left-click should focus/select the item under cursor but
|
||||
// should NOT toggle its marked state. This preserves keyboard
|
||||
// marking (Insert) while making mouse clicks act as simple focus.
|
||||
if (e.getClickCount() == 1 && javax.swing.SwingUtilities.isLeftMouseButton(e)) {
|
||||
if (e.getClickCount() % 2 == 1 && javax.swing.SwingUtilities.isLeftMouseButton(e)) {
|
||||
boolean selected = false;
|
||||
if (row >= 0) {
|
||||
// Convert brief layout coordinates to absolute index where needed
|
||||
@ -336,7 +336,7 @@ public class FilePanelTab extends JPanel {
|
||||
}
|
||||
|
||||
// Double-click opens the item under cursor (directories)
|
||||
if (e.getClickCount() == 2) {
|
||||
if (e.getClickCount() >= 2 && e.getClickCount() % 2 == 0) {
|
||||
openItemAtPoint(e.getPoint());
|
||||
}
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ public class SearchDialog extends JDialog {
|
||||
resultsTable.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(java.awt.event.MouseEvent e) {
|
||||
if (e.getClickCount() == 2) {
|
||||
if (e.getClickCount() >= 2 && e.getClickCount() % 2 == 0) {
|
||||
openSelectedFile();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user