Salome HOME
Merge 'abn/V8_1_fix' branch into V8_1_BR.
[modules/med.git] / src / MEDCalc / gui / WorkspaceController.cxx
index dd59a244776e709b9d1a9052e1951f3ac087960f..a2c442aa4b68e7a8644f7da7b01b325d252e8482 100644 (file)
@@ -527,6 +527,12 @@ void WorkspaceController::processDatasourceEvent(const DatasourceEvent* event) {
     commands += QString("source_id = medcalc.LoadDataSource('%1')").arg(event->objectalias);
     commands += QString("source_id");
     _consoleDriver->exec(commands);
+
+    // Create a default presentation when loading a file
+    MEDCALC::MedEvent* evt = new MEDCALC::MedEvent();
+    evt->type = MEDCALC::EVENT_ADD_PRESENTATION;
+    evt->dataId = -1;
+    emit workspaceSignal(evt); // forward to PresentationController
   }
   else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
     QStringList commands;