Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
17bdb8d4
Commit
17bdb8d4
authored
8 years ago
by
Simon Heybrock
Browse files
Options
Downloads
Patches
Plain Diff
Re #18234. Small cleanup in MantidMatrixModel.
parent
a354fcb4
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MantidPlot/src/Mantid/MantidMatrixModel.cpp
+7
-17
7 additions, 17 deletions
MantidPlot/src/Mantid/MantidMatrixModel.cpp
with
7 additions
and
17 deletions
MantidPlot/src/Mantid/MantidMatrixModel.cpp
+
7
−
17
View file @
17bdb8d4
...
@@ -283,15 +283,10 @@ bool MantidMatrixModel::checkMonitorCache(int row) const {
...
@@ -283,15 +283,10 @@ bool MantidMatrixModel::checkMonitorCache(int row) const {
if
(
m_monCache
.
contains
(
row
))
{
if
(
m_monCache
.
contains
(
row
))
{
isMon
=
m_monCache
.
value
(
row
);
isMon
=
m_monCache
.
value
(
row
);
}
else
{
}
else
{
try
{
const
auto
&
specInfo
=
m_workspace
->
spectrumInfo
();
size_t
wsIndex
=
static_cast
<
size_t
>
(
row
);
size_t
wsIndex
=
static_cast
<
size_t
>
(
row
);
auto
det
=
m_workspace
->
getDetector
(
wsIndex
);
isMon
=
specInfo
.
hasDetectors
(
wsIndex
)
&&
specInfo
.
isMonitor
(
wsIndex
);
isMon
=
det
->
isMonitor
();
m_monCache
.
insert
(
row
,
isMasked
);
m_monCache
.
insert
(
row
,
isMon
);
}
catch
(
std
::
exception
&
)
{
m_monCache
.
insert
(
row
,
false
);
isMon
=
false
;
}
}
}
return
isMon
;
return
isMon
;
}
else
{
}
else
{
...
@@ -311,15 +306,10 @@ bool MantidMatrixModel::checkMaskedCache(int row) const {
...
@@ -311,15 +306,10 @@ bool MantidMatrixModel::checkMaskedCache(int row) const {
if
(
m_maskCache
.
contains
(
row
))
{
if
(
m_maskCache
.
contains
(
row
))
{
isMasked
=
m_maskCache
.
value
(
row
);
isMasked
=
m_maskCache
.
value
(
row
);
}
else
{
}
else
{
const
auto
&
spec
trum
Info
=
m_workspace
->
spectrumInfo
();
const
auto
&
specInfo
=
m_workspace
->
spectrumInfo
();
size_t
wsIndex
=
static_cast
<
size_t
>
(
row
);
size_t
wsIndex
=
static_cast
<
size_t
>
(
row
);
if
(
spectrumInfo
.
hasDetectors
(
wsIndex
))
{
isMasked
=
specInfo
.
hasDetectors
(
wsIndex
)
&&
specInfo
.
isMasked
(
wsIndex
);
isMasked
=
spectrumInfo
.
isMasked
(
wsIndex
);
m_maskCache
.
insert
(
row
,
isMasked
);
m_maskCache
.
insert
(
row
,
isMasked
);
}
else
{
m_maskCache
.
insert
(
row
,
false
);
isMasked
=
false
;
}
}
}
return
isMasked
;
return
isMasked
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment