Просмотр исходного кода

BUG: correct parent for dicom stats dialog

As reported in Slicer bug 4360 [1] the import statistics dialog could show up in unexpected places
when using a multi-monitor system.

The cause seems to be that even though the the ctkDICOMBrowser was set as the parent,
the dialog wasn't centered there because it was called from inside a signal from the import dialog.
Instead it showed up in the center of the overall workspace (which could be on a different
monitor).

This fix sets the parent to be the import dialog.  Tested on mac with single monitor and confirmed
that this change makes the stats dialog appear over the import dialog and that makes things
clearer.  This should also address the original multi-monitor issue.

[1] https://issues.slicer.org/view.php?id=4360
Steve Pieper лет назад: 7
Родитель
Сommit
8a25a0628b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Libs/DICOM/Widgets/ctkDICOMBrowser.cpp

+ 1 - 1
Libs/DICOM/Widgets/ctkDICOMBrowser.cpp

@@ -712,7 +712,7 @@ void ctkDICOMBrowser::importDirectories(QStringList directories, ctkDICOMBrowser
 
   if (d->DisplayImportSummary)
     {
-    QMessageBox::information(this,"DICOM Directory Import", stats.summary());
+    QMessageBox::information(d->ImportDialog,"DICOM Directory Import", stats.summary());
     }
 }