Commit f427c747 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

sync

parent 4efa1b68
Pipeline #67143 failed with stage
in 5 minutes and 48 seconds
......@@ -201,6 +201,7 @@ class GroupInfo;
//!
//! This code part again shows the (highly error-prone) string-based type checking.
//#define USE_MAPPERS
#include <QDebug>
class BA_CORE_API_ SessionItem {
friend class SessionModel;
......
......@@ -96,7 +96,7 @@ IntensityDataItem* JobItem::intensityDataItem()
DataItem* JobItem::dataItem()
{
return dynamic_cast<DataItem*>(intensityDataItem());
return dynamic_cast<DataItem*>(getItem(T_OUTPUT));
}
JobStatus JobItem::getStatus() const
......
......@@ -50,8 +50,11 @@ void FitComparison1DViewController::setItem(JobItem* job_item)
ASSERT(job_item);
clear();
qInfo() << "1::setItem";
m_diff_item_controller->setItems(job_item);
qInfo() << "2::setItem";
createDiffViewItem(job_item);
qInfo() << "3::setItem";
auto* job_data_view = job_item->dataItemView();
......@@ -92,9 +95,13 @@ void FitComparison1DViewController::clear()
void FitComparison1DViewController::createDiffViewItem(JobItem* job_item)
{
qInfo() << "createDiffViewItem 1";
m_diff_view_item = m_diff_item_controller->model()->insertItem<Data1DViewItem>();
qInfo() << "createDiffViewItem 2";
auto* container = m_diff_view_item->createPropertyContainerItem();
qInfo() << "createDiffViewItem 3";
container->addItem(m_diff_item_controller->diffItem());
qInfo() << "createDiffViewItem 4";
m_diff_view_item->setJobItem(job_item);
auto* job_data_view = job_item->dataItemView();
......@@ -124,6 +131,7 @@ DiffItemController::~DiffItemController()
void DiffItemController::setItems(JobItem* job_item)
{
qInfo() << "DiffItemController::setItems";
ASSERT(job_item);
ASSERT(job_item->diffDataItem());
......@@ -174,6 +182,7 @@ void DiffItemController::subscribe()
void DiffItemController::unsubscribe()
{
qInfo() << "DiffItemController::unsubscribe" << m_current_item << m_diff_item << endl;
#ifdef USE_MAPPERS
m_diff_item->mapper()->unsubscribe(this);
#else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment