File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -390,15 +390,18 @@ void CDockAreaTabBar::onTabWidgetMoved(const QPoint& GlobalPos)
390390
391391 int fromIndex = d->TabsLayout ->indexOf (MovingTab);
392392 auto MousePos = mapFromGlobal (GlobalPos);
393- MousePos.rx () = qMax (d-> firstTab ()-> geometry (). left () , MousePos.x ());
394- MousePos.rx () = qMin (d-> lastTab ()-> geometry (). right (), MousePos.x ());
393+ MousePos.rx () = qMax (0 , MousePos.x ());
394+ MousePos.rx () = qMin (width (), MousePos.x ());
395395 int toIndex = -1 ;
396396 // Find tab under mouse
397397 for (int i = 0 ; i < count (); ++i)
398398 {
399399 CDockWidgetTab* DropTab = tab (i);
400+ auto TabGeometry = DropTab->geometry ();
401+ TabGeometry.setTopLeft (d->TabsContainerWidget ->mapToParent (TabGeometry.topLeft ()));
402+ TabGeometry.setBottomRight (d->TabsContainerWidget ->mapToParent (TabGeometry.bottomRight ()));
400403 if (DropTab == MovingTab || !DropTab->isVisibleTo (this )
401- || !DropTab-> geometry () .contains (MousePos))
404+ || !TabGeometry .contains (MousePos))
402405 {
403406 continue ;
404407 }
You can’t perform that action at this time.
0 commit comments