Skip to content
Snippets Groups Projects
Commit 853ff741 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

reverted commit e87de6bc to separate Jobs Activity and Presentation

parent 13e8f300
No related branches found
No related tags found
1 merge request!837GUI: fixed crashes when rerun jobs with 2D reference data
Pipeline #64148 passed
......@@ -49,11 +49,6 @@ QString JobResultsPresenter::itemPresentation() const
void JobResultsPresenter::setItem(SessionItem* item)
{
if (currentItem())
currentItem()->mapper()->unsubscribe(this);
if (item)
item->mapper()->setOnPropertyChange(
[this](auto&& PH1) { notifyJobPropertyChanged(std::forward<decltype(PH1)>(PH1)); });
ItemComboWidget::setItem(item);
}
......@@ -67,7 +62,6 @@ void JobResultsPresenter::setPresentation(const QString& presentationType)
void JobResultsPresenter::setPresentation(JobViewActivity activity)
{
m_activity = activity;
QString presentation;
auto* jobItem = dynamic_cast<JobItem*>(currentItem());
if (jobItem && !jobItem->isRunning()) {
......@@ -144,9 +138,3 @@ QString JobResultsPresenter::fitPresentationOfInstrument(InstrumentItem* instrum
return "Fit 2D Data";
}
void JobResultsPresenter::notifyJobPropertyChanged(const QString& property)
{
if (JobItem::isStatusPropertyName(property))
setPresentation(m_activity);
}
......@@ -45,10 +45,6 @@ private:
QString defaultPresentationOfInstrument(InstrumentItem* instrumentItem);
QStringList defaultActivePresentationsOfInstrument(InstrumentItem* instrumentItem);
QString fitPresentationOfInstrument(InstrumentItem* instrumentItem);
void notifyJobPropertyChanged(const QString& property);
private:
JobViewActivity m_activity;
};
#endif // BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment