knossos
knossos copied to clipboard
Bad message box positions for clearing annotation on dataset change
Message box on dataset load widget:
Click on “Start new one”
Message box in center of screen:
It’s annoying that I have to move the cursor because of this.
This occurs every time when I switch datasets, because I always load multiple skeletons which automatically causes unsaved changes.
:thinking:
It’s a gnome issue, for a short time after a dialog closes no window has focus leaving the second dialog orphan.
You can use the keyboard. :wink:
#28 ^^
diff --git a/widgets/datasetloadwidget.cpp b/widgets/datasetloadwidget.cpp
index a45e836f..a674c3dc 100644
--- a/widgets/datasetloadwidget.cpp
+++ b/widgets/datasetloadwidget.cpp
@@ -273,6 +273,9 @@ bool DatasetLoadWidget::loadDataset(const boost::optional<bool> loadOverlay, QUr
const auto * const clearButton = question.addButton(tr("Start &new one"), QMessageBox::RejectRole);
const auto * const cancelButton = question.addButton(QMessageBox::Cancel);
question.exec();
+ QApplication::processEvents();
+ activateWindow();// QThread::msleep(10); also works
+ QApplication::processEvents();
if (question.clickedButton() == cancelButton || (question.clickedButton() == clearButton && !state->viewer->window->newAnnotationSlot())) {// clear skeleton, mergelist and snappy cubes
return false;
}