+ // Workaround to visualize the result
+ MEDCouplingFieldDouble* fieldDouble = MEDDataManager_i::getInstance()->getFieldDouble(fieldHandler);
+ std::string filename = std::tmpnam(NULL);
+ WriteField(filename.c_str(), fieldDouble, true);
+
+ QStringList commands;
+ commands += QString("source_id = medcalc.LoadDataSource('%1')").arg(filename.c_str());
+ commands += QString("source_id");
+ commands += QString("mesh_id = medcalc.GetFirstMeshFromDataSource(source_id)");
+ commands += QString("mesh_id");
+ commands += QString("field_id = medcalc.GetFirstFieldFromMesh(mesh_id)");
+ commands += QString("field_id");
+ commands += QString("presentation_id = medcalc.MakeScalarMap(accessField(field_id), viewMode=MEDCALC.VIEW_MODE_NEW_LAYOUT)");
+ commands += QString("presentation_id");
+ _consoleDriver->exec(commands);
+ }
+ else if ( event->type == MEDCALC::EVENT_PLAY_TEST ) {
+ emit workspaceSignal(event); // forward to TestController
+ }
+ else if ( event->type == MEDCALC::EVENT_QUIT_SALOME ) {
+ emit workspaceSignal(event); // forward to TestController
+ }
+ else if ( event->type == MEDCALC::EVENT_ERROR ) {
+ std::string msg(event->msg);
+ QMessageBox::warning(_salomeModule->getApp()->desktop(), "Error", QString::fromStdString(msg));
+ }
+ else
+ STDLOG("WorkspaceController::processMedEvent(): Unhandled event!!!");