Always return false on MainWindow eventFilter

This commit is contained in:
sgourdas 2024-03-20 23:53:35 +02:00 committed by Kelson
parent 2f364ebd89
commit 9639a3f777

View File

@ -110,14 +110,12 @@ bool MainWindow::eventFilter(QObject* /*object*/, QEvent* event)
const auto mouseEvent = static_cast<QMouseEvent*>(event);
const int tabRegion = getTabBar()->height() + getTopWidget()->height() + 30;
int clickY = portutils::getY(*mouseEvent);
// We don't have to check for visibilty as calling hide() on a hidden widget, or show() on a non-hidden widget is a no-op
if (clickY == 0) {
showTabAndTop();
} else if(clickY >= tabRegion) {
hideTabAndTop();
}
return true;
}
return false;
}