Fixed setting of tab widget visibility and toggleViewAction() state when dragging dock areas with closed dock widgets

This commit is contained in:
Uwe Kindler
2018-09-07 12:38:11 +02:00
parent 67199a81f4
commit c9123c3640
4 changed files with 28 additions and 12 deletions

View File

@@ -244,14 +244,14 @@ void CDockWidgetTab::mouseReleaseEvent(QMouseEvent* ev)
{
// Find tab under mouse
QPoint pos = d->DockArea->mapFromGlobal(ev->globalPos());
int fromIndex = d->DockArea->tabIndex(d->DockWidget);
int fromIndex = d->DockArea->index(d->DockWidget);
int toIndex = d->DockArea->indexOfContentByTitlePos(pos, this);
if (-1 == toIndex)
{
toIndex = d->DockArea->count() - 1;
}
qDebug() << "Move tab from " << fromIndex << " to " << toIndex;
d->DockArea->reorderDockWidget(fromIndex, toIndex);
//d->DockArea->reorderDockWidget(fromIndex, toIndex);
}
if (!d->DragStartMousePosition.isNull())