From 853ff741c69289410dcbd744606e2f93fd571a63 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <svechnikovmv@gmail.com>
Date: Sun, 8 May 2022 21:04:52 +0200
Subject: [PATCH] reverted commit e87de6bc to separate Jobs Activity and
 Presentation

---
 GUI/View/Job/JobResultsPresenter.cpp | 12 ------------
 GUI/View/Job/JobResultsPresenter.h   |  4 ----
 2 files changed, 16 deletions(-)

diff --git a/GUI/View/Job/JobResultsPresenter.cpp b/GUI/View/Job/JobResultsPresenter.cpp
index dcd676e8f2a..1c7fa030a93 100644
--- a/GUI/View/Job/JobResultsPresenter.cpp
+++ b/GUI/View/Job/JobResultsPresenter.cpp
@@ -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);
-}
diff --git a/GUI/View/Job/JobResultsPresenter.h b/GUI/View/Job/JobResultsPresenter.h
index f4b61a95c72..aeca878bf7a 100644
--- a/GUI/View/Job/JobResultsPresenter.h
+++ b/GUI/View/Job/JobResultsPresenter.h
@@ -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
-- 
GitLab