diff --git a/Core/FormFactors/src/FormFactorTruncatedSphere.cpp b/Core/FormFactors/src/FormFactorTruncatedSphere.cpp index 5f3fb9ca188981e27893a90d7e95d99081a18be6..31b8481895ff0f781abc5d7485c4fb93825d610f 100644 --- a/Core/FormFactors/src/FormFactorTruncatedSphere.cpp +++ b/Core/FormFactors/src/FormFactorTruncatedSphere.cpp @@ -27,7 +27,7 @@ FormFactorTruncatedSphere::FormFactorTruncatedSphere(double radius, double heigh setName("FormFactorTruncatedSphere"); if(m_height > 2.*m_radius) { std::ostringstream ostr; - ostr << "FormFactorTruncatedSphere::FormFactorTruncatedSphere() -> Error in class initialization. "; + ostr << "::FormFactorTruncatedSphere() -> Error in class initialization. "; ostr << " Check for m_height <= 2.*m_radius failed."; ostr << " radius:" << m_radius << " height:" << m_height; throw Exceptions::ClassInitializationException(ostr.str()); diff --git a/GUI/coregui/Models/JobItem.cpp b/GUI/coregui/Models/JobItem.cpp index 60e42f42679c0271128f39056847ebebd42968b0..dbc7f2b7723646316ae24e16e7beb7a616895341 100644 --- a/GUI/coregui/Models/JobItem.cpp +++ b/GUI/coregui/Models/JobItem.cpp @@ -143,6 +143,13 @@ void JobItem::setStatus(const QString &status) ComboProperty combo_property = getRegisteredProperty(P_STATUS).value<ComboProperty>(); combo_property.setValue(status); setRegisteredProperty(P_STATUS, combo_property.getVariant()); + if(status == Constants::STATUS_FAILED) { + if(IntensityDataItem *intensityItem = getIntensityDataItem()) { + if(intensityItem->getOutputData()) + intensityItem->getOutputData()->setAllTo(0.0); + emit intensityItem->intensityModified(); + } + } } bool JobItem::isIdle() const diff --git a/GUI/coregui/Models/JobQueueData.cpp b/GUI/coregui/Models/JobQueueData.cpp index 7414df27eb500807268eec9257a38a0e49e7cd26..4c183b85fd449897affa23eba276300078074bf7 100644 --- a/GUI/coregui/Models/JobQueueData.cpp +++ b/GUI/coregui/Models/JobQueueData.cpp @@ -228,14 +228,16 @@ void JobQueueData::onFinishedJob() QString end_time = QDateTime::currentDateTime().toString("yyyy.MM.dd hh:mm:ss"); jobItem->setEndTime(end_time); - // propagating simulation results - Simulation *simulation = getSimulation(runner->getIdentifier()); - setResults(jobItem, simulation); // propagating status of runner jobItem->setStatus(runner->getStatus()); - if(jobItem->isFailed()) + if(jobItem->isFailed()) { jobItem->setComments(runner->getFailureMessage()); + } else { + // propagating simulation results + Simulation *simulation = getSimulation(runner->getIdentifier()); + setResults(jobItem, simulation); + } // I tell to the thread to exit here (instead of connecting JobRunner::finished to the QThread::quit because of strange behaviour) getThread(runner->getIdentifier())->quit(); diff --git a/GUI/coregui/Views/JobWidgets/ModelTuningWidget.cpp b/GUI/coregui/Views/JobWidgets/ModelTuningWidget.cpp index 0f5244a1dbfd2e435581d3d20f3aa5167ed75c3d..5ac0795f335c4a581dea10be6cf37f6db5392b0f 100644 --- a/GUI/coregui/Views/JobWidgets/ModelTuningWidget.cpp +++ b/GUI/coregui/Views/JobWidgets/ModelTuningWidget.cpp @@ -85,6 +85,11 @@ void ModelTuningWidget::onCurrentLinkChanged(ItemLink link) qDebug() << "ModelTuningWidget::onCurrentLinkChanged"; Q_ASSERT(m_currentJobItem); + if(m_currentJobItem->isFailed()) { + QModelIndexList indexList = m_treeView->selectionModel()->selectedIndexes(); + qDebug() << "XXX " << indexList; + } + if(m_currentJobItem->isRunning()) return;