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
b41a29b5
Commit
b41a29b5
authored
4 years ago
by
Matthew Andrew
Browse files
Options
Downloads
Patches
Plain Diff
Removed unnecessary visitor class Re #28057
parent
0d507767
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp
+7
-25
7 additions, 25 deletions
...ientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp
with
7 additions
and
25 deletions
qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp
+
7
−
25
View file @
b41a29b5
...
...
@@ -11,29 +11,6 @@
#include
<QTimer>
#include
<utility>
namespace
{
using
MantidQt
::
CustomInterfaces
::
IDA
::
IIndirectFitPlotView
;
using
MantidQt
::
CustomInterfaces
::
IDA
::
Spectra
;
using
MantidQt
::
CustomInterfaces
::
IDA
::
WorkspaceIndex
;
struct
UpdateAvailableSpectra
:
public
boost
::
static_visitor
<>
{
public:
explicit
UpdateAvailableSpectra
(
IIndirectFitPlotView
*
view
)
:
m_view
(
view
)
{}
void
operator
()(
const
Spectra
&
spectra
)
{
if
(
spectra
.
isContinuous
())
{
auto
const
minmax
=
spectra
.
getMinMax
();
m_view
->
setAvailableSpectra
(
minmax
.
first
,
minmax
.
second
);
}
else
{
m_view
->
setAvailableSpectra
(
spectra
.
begin
(),
spectra
.
end
());
}
}
private
:
IIndirectFitPlotView
*
m_view
;
};
}
// namespace
namespace
MantidQt
{
namespace
CustomInterfaces
{
namespace
IDA
{
...
...
@@ -231,8 +208,13 @@ void IndirectFitPlotPresenter::updateDataSelection() {
void
IndirectFitPlotPresenter
::
updateAvailableSpectra
()
{
if
(
m_model
->
getWorkspace
())
{
enableAllDataSelection
();
auto
updateSpectra
=
UpdateAvailableSpectra
(
m_view
);
updateSpectra
(
m_model
->
getSpectra
());
auto
spectra
=
m_model
->
getSpectra
();
if
(
spectra
.
isContinuous
())
{
auto
const
minmax
=
spectra
.
getMinMax
();
m_view
->
setAvailableSpectra
(
minmax
.
first
,
minmax
.
second
);
}
else
{
m_view
->
setAvailableSpectra
(
spectra
.
begin
(),
spectra
.
end
());
}
setActiveSpectrum
(
m_view
->
getSelectedSpectrum
());
}
else
disableAllDataSelection
();
...
...
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