Skip to content

Commit 9fc9e23

Browse files
committed
Fixed close tab by middle mouse button click
1 parent 4684d5d commit 9fc9e23

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
@@ -158,9 +158,12 @@ private void createUIComponents() {
158158
public void mouseReleased(MouseEvent e) {
159159
if (UIUtil.isCloseClick(e, MouseEvent.MOUSE_RELEASED)) {
160160
final TabInfo info = consoleTabs.findInfo(e);
161-
if (info != null && info.getText().startsWith("Query ")) {
162-
IdeEventQueue.getInstance().blockNextEvents(e);
163-
consoleTabs.removeTab(info);
161+
if (info != null) {
162+
String tabTitle = info.getText();
163+
if (tabTitle.startsWith("Profile") || tabTitle.startsWith("Explain")) {
164+
IdeEventQueue.getInstance().blockNextEvents(e);
165+
consoleTabs.removeTab(info);
166+
}
164167
}
165168
}
166169
}

0 commit comments

Comments
 (0)