IDEA-134572 Watch edit by mouse click is triggered when it should not

This commit is contained in:
Egor.Ushakov
2014-12-23 12:17:59 +03:00
parent e56e740ce2
commit 4256881593
@@ -184,6 +184,10 @@ public class XWatchesViewImpl extends XDebugView implements DnDNativeTarget, XWa
return false;
}
boolean sameRow = isAboveSelectedItem(event, watchTree);
if (!sameRow || clickCount > 1) {
editAlarm.cancelAllRequests();
return false;
}
final AnAction editWatchAction = ActionManager.getInstance().getAction(XDebuggerActions.XEDIT_WATCH);
Presentation presentation = editWatchAction.getTemplatePresentation().clone();
DataContext context = DataManager.getInstance().getDataContext(watchTree);
@@ -194,7 +198,7 @@ public class XWatchesViewImpl extends XDebugView implements DnDNativeTarget, XWa
editWatchAction.actionPerformed(actionEvent);
}
};
if (sameRow && editAlarm.isEmpty() && quitePeriod.isEmpty()) {
if (editAlarm.isEmpty() && quitePeriod.isEmpty()) {
editAlarm.addRequest(runnable, UIUtil.getMultiClickInterval());
} else {
editAlarm.cancelAllRequests();