This commit is contained in:
Juergen Spitzmueller 2021-11-01 13:08:16 +01:00
parent 76ac4d8f8d
commit b9a9234cf6

View File

@ -565,28 +565,32 @@ GuiSearch::GuiSearch(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags
} }
void GuiSearch::mousePressEvent(QMouseEvent *event) void GuiSearch::mousePressEvent(QMouseEvent * event)
{ {
if (isFloating() && event->button() == Qt::LeftButton) { if (isFloating() && event->button() == Qt::LeftButton) {
dragPosition = event->globalPos() - frameGeometry().topLeft(); dragPosition = event->globalPos() - frameGeometry().topLeft();
event->accept(); event->accept();
} } else
DockView::mousePressEvent(event);
} }
void GuiSearch::mouseMoveEvent(QMouseEvent *event) void GuiSearch::mouseMoveEvent(QMouseEvent * event)
{ {
if (isFloating() && event->buttons() & Qt::LeftButton) { if (isFloating() && event->buttons() & Qt::LeftButton) {
move(event->globalPos() - dragPosition); move(event->globalPos() - dragPosition);
event->accept(); event->accept();
} } else
DockView::mouseMoveEvent(event);
} }
void GuiSearch::mouseDoubleClickEvent(QMouseEvent *event) void GuiSearch::mouseDoubleClickEvent(QMouseEvent * event)
{ {
if (event->button() == Qt::LeftButton) if (event->button() == Qt::LeftButton)
setFloating(!isFloating()); setFloating(!isFloating());
else
DockView::mouseDoubleClickEvent(event);
} }