Skip to content

Commit e49ce5e

Browse files
committed
Fixed close tab by middle mouse button click
1 parent 528da71 commit e49ce5e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/GraphConsoleView.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,12 @@ private void createUIComponents() {
152152
public void mouseReleased(MouseEvent e) {
153153
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
154154
final TabInfo info = consoleTabs.findInfo(e);
155-
if (info != null && info.getText().startsWith("Query ")) {
156-
IdeEventQueue.getInstance().blockNextEvents(e);
157-
consoleTabs.removeTab(info);
155+
if (info != null) {
156+
String tabTitle = info.getText();
157+
if (tabTitle.startsWith("Profile") || tabTitle.startsWith("Explain")) {
158+
IdeEventQueue.getInstance().blockNextEvents(e);
159+
consoleTabs.removeTab(info);
160+
}
158161
}
159162
}
160163
}

0 commit comments

Comments
 (0)