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)
390
390
391
391
int fromIndex = d->TabsLayout ->indexOf (MovingTab);
392
392
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 ());
395
395
int toIndex = -1 ;
396
396
// Find tab under mouse
397
397
for (int i = 0 ; i < count (); ++i)
398
398
{
399
399
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 ()));
400
403
if (DropTab == MovingTab || !DropTab->isVisibleTo (this )
401
- || !DropTab-> geometry () .contains (MousePos))
404
+ || !TabGeometry .contains (MousePos))
402
405
{
403
406
continue ;
404
407
}
You can’t perform that action at this time.
0 commit comments