Quellcode durchsuchen

Fix bug where data would not appear in model after import

The import would succeed, but since it happened during a "Future"
concurrent execution the model was never aware of it and the gui
would not update.  Now, the model's reset slot is connected
so it will be triggered when the indexing finishes.
Steve Pieper vor 13 Jahren
Ursprung
Commit
a58b465a3d
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp

+ 2 - 2
Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp

@@ -450,10 +450,10 @@ void ctkDICOMAppWidget::onImportDirectory(QString directory)
 
 
     connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
     connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
             progress, SLOT(close()));
             progress, SLOT(close()));
+    connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
+            &d->DICOMModel, SLOT(reset()));
 
 
     d->DICOMIndexer->addDirectory(*d->DICOMDatabase,directory,targetDirectory);
     d->DICOMIndexer->addDirectory(*d->DICOMDatabase,directory,targetDirectory);
-
-    d->DICOMModel.reset();
   }
   }
 }
 }