Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mlz
BornAgain
Commits
f7f1a14b
Commit
f7f1a14b
authored
Jun 08, 2022
by
Mikhail Svechnikov
Browse files
test new diffItem location
parent
c6a70734
Changes
3
Hide whitespace changes
Inline
Side-by-side
GUI/Model/Job/JobItem.h
View file @
f7f1a14b
...
...
@@ -173,6 +173,7 @@ T* JobItem::setDataType()
{
static_assert
(
std
::
is_base_of
<
DataItem
,
T
>::
value
,
"Class must be derived from DataItem"
);
qInfo
()
<<
model
()
->
insertItem
<
T
>
(
this
,
-
1
,
T_DIFF
);
return
model
()
->
insertItem
<
T
>
(
this
,
-
1
,
T_OUTPUT
);
}
...
...
GUI/View/PlotComparison/FitComparisonController.cpp
View file @
f7f1a14b
...
...
@@ -123,10 +123,10 @@ void FitComparisonController2D::clear()
DiffItemController
::
DiffItemController
(
const
QString
&
data_type
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_current_item
(
nullptr
)
,
m_tempIntensityDataModel
(
new
SessionModel
(
"TempIntensityDataModel"
,
this
))
,
m_diff_item
(
dynamic_cast
<
DataItem
*>
(
m_tempIntensityDataModel
->
insertNewItem
(
data_type
)))
//
, m_tempIntensityDataModel(new SessionModel("TempIntensityDataModel", this))
//
, m_diff_item(dynamic_cast<DataItem*>(m_tempIntensityDataModel->insertNewItem(data_type)))
{
ASSERT
(
m_diff_item
);
//
ASSERT(m_diff_item);
}
DiffItemController
::~
DiffItemController
()
...
...
@@ -137,9 +137,13 @@ DiffItemController::~DiffItemController()
void
DiffItemController
::
setItem
(
JobItem
*
job_item
)
{
ASSERT
(
job_item
);
ASSERT
(
job_item
->
diffDataItem
());
if
(
m_current_item
)
unsubscribe
();
m_current_item
=
job_item
;
m_diff_item
=
job_item
->
diffDataItem
();
subscribe
();
updateDiffData
();
}
...
...
GUI/View/PlotComparison/FitComparisonViewController.cpp
View file @
f7f1a14b
...
...
@@ -114,10 +114,10 @@ void FitComparison1DViewController::deleteDiffViewItem()
DiffItemController
::
DiffItemController
(
const
QString
&
data_type
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_current_item
(
nullptr
)
,
m_private_model
(
new
SessionModel
(
"TempIntensityDataModel"
,
this
))
,
m_diff_item
(
dynamic_cast
<
DataItem
*>
(
m_private_model
->
insertNewItem
(
data_type
)))
//
, m_private_model(new SessionModel("TempIntensityDataModel", this))
//
, m_diff_item(dynamic_cast<DataItem*>(m_private_model->insertNewItem(data_type)))
{
ASSERT
(
m_diff_item
);
//
ASSERT(m_diff_item);
}
DiffItemController
::~
DiffItemController
()
...
...
@@ -128,9 +128,13 @@ DiffItemController::~DiffItemController()
void
DiffItemController
::
setJobItem
(
JobItem
*
job_item
)
{
ASSERT
(
job_item
);
ASSERT
(
job_item
->
diffDataItem
());
if
(
m_current_item
)
unsubscribe
();
m_current_item
=
job_item
;
m_diff_item
=
job_item
->
diffDataItem
();
subscribe
();
updateDiffData
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment