Fixes #179 tabs can't be repositioned

This commit is contained in:
fourtf
2018-01-22 21:31:45 +01:00
parent 305191d4b3
commit 06be94b9a6
3 changed files with 11 additions and 7 deletions
+4 -4
View File
@@ -291,14 +291,14 @@ void NotebookTab::mouseMoveEvent(QMouseEvent *event)
}
}
if (this->mouseDown && !this->getDesiredRect().contains(event->pos())) {
QPoint relPoint = this->mapToParent(event->pos());
QPoint relPoint = this->mapToParent(event->pos());
if (this->mouseDown && !this->getDesiredRect().contains(relPoint)) {
int index;
SplitContainer *clickedPage = notebook->tabAt(relPoint, index);
SplitContainer *clickedPage = notebook->tabAt(relPoint, index, this->width());
if (clickedPage != nullptr && clickedPage != this->page) {
this->notebook->rearrangePage(clickedPage, index);
this->notebook->rearrangePage(this->page, index);
}
}
}