summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibGUI/TabWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp
index 1f73b87bfe..31bab33988 100644
--- a/Userland/Libraries/LibGUI/TabWidget.cpp
+++ b/Userland/Libraries/LibGUI/TabWidget.cpp
@@ -362,6 +362,7 @@ void TabWidget::mouseup_event(MouseEvent& event)
return;
auto close_button_rect = this->close_button_rect(m_pressed_close_button_index);
+ m_pressed_close_button_index = -1;
if (close_button_rect.contains(event.position())) {
auto* widget = m_tabs[m_pressed_close_button_index].widget;
@@ -369,7 +370,6 @@ void TabWidget::mouseup_event(MouseEvent& event)
if (on_tab_close_click && widget)
on_tab_close_click(*widget);
});
- m_pressed_close_button_index = -1;
return;
}
}