diff --git a/src/UI/UnclosableDockWidget.cc b/src/UI/UnclosableDockWidget.cc index 0b7fb6bec74aa2a0b56192e24db60d475ea8dd03..a148703591668672c52fe00a547bd6de8d1b1c1a 100644 --- a/src/UI/UnclosableDockWidget.cc +++ b/src/UI/UnclosableDockWidget.cc @@ -13,7 +13,7 @@ void UnclosableDockWidget::closeEvent(QCloseEvent *event) noexcept { if (allowedToClose) - event->accept(); + QDockWidget::closeEvent(event); else event->ignore(); } @@ -21,5 +21,6 @@ UnclosableDockWidget::closeEvent(QCloseEvent *event) noexcept void UnclosableDockWidget::allowClose() noexcept { + qDebug() << "Dock" << windowTitle() << "is now allowed to be closed"; allowedToClose = true; } diff --git a/src/UI/VivyDocumentView.cc b/src/UI/VivyDocumentView.cc index 575871eaf02ee740a1c9bcc8d9f8a726351073d1..1f1f3ec32e839f2e92e4a25b4d91e53bfd6925ff 100644 --- a/src/UI/VivyDocumentView.cc +++ b/src/UI/VivyDocumentView.cc @@ -52,9 +52,10 @@ VivyDocumentView::getDocument() const noexcept QString VivyDocumentView::getDocumentTabName() const noexcept { - return document->checkDocumentOption(VivyDocument::UntouchedByDefault) - ? (Utils::untouchedTabIndicator + " ") - : QString::fromUtf8("") + Utils::getBaseName(document->getName()); + return (document->checkDocumentOption(VivyDocument::UntouchedByDefault) + ? (Utils::untouchedTabIndicator + " ") + : QString::fromUtf8("")) + + Utils::getBaseName(document->getName()); } QString @@ -147,8 +148,6 @@ VivyDocumentView::closeDocument() noexcept << document.use_count() << ")"; vivyApp->documentStore.closeDocument(document->getUuid()); - TODO(Force close all floating docks) - // Kubat: the visualizer pointer should have been deleted by the // deleteAllContent() call if it was created. deleteAllContent();