Skip to content

Commit 35ae4c8

Browse files
peterfpetersonrbauststfcadriazalvarez
authored
Remove nested boost::optionals in ISISReflectometry - ornl-next (#39260)
* Display region selectors on Reflectometry GUI Preview Tab slice viewer plot on workspace load (#38838) * Add region selectors to slice viewer plot when have matching settings When loading a workspace or updating the angle on the preview tab, display region selectors on the slice viewer plot for any matching experiment settings from the look-up table. * Remove method that is no longer used * Add release notes for issue 36573 * Update preview tab manual testing instructions * Remove nested boost::optionals in ISISReflectometry (#39223) * Add validatorT typedef as a std::pair of boost::optional<T> and bool to avoid the need for nested boost:optional * Refactor variadic template functions to validate all table fields are properly initialized, and use simpler fold syntax to check validity of all rows * Change boost optional in common classes * - Changed boost to std optional in batch classes - Change boost::optional<T&> to std::optional<std::reference_wrapper<T>> * - Changed boost to std optional in decoder/encoder * - Changed boost to std optional in experiment and preview classes * - Changed boost to std optional in Runs and RunsTable * - Changed boost to std optional in Reduction * - Make tests compatible with changes to std::optional in IsisReflectometry * - Change more boost optional in ISIS Reflectometry * - Remove unused allinitialized file * Fix a bunch of cppcheck suppresions * Move TaggetOptional out of validation result * remove unnecesary include * Make sure boost::optional contains values before initializing clipboard * Move TaggedOptional into ParseReflectometryStrings * Fix broken scale factor test * Remove unnecesary creation of optionals for the row objects and rename variables to more appropriate names as nested boost optional is no longer used * Add extra check for std::nullopt in parse scale factor test --------- Co-authored-by: rbauststfc <38210467+rbauststfc@users.noreply.github.com> Co-authored-by: Adri Diaz <146007827+adriazalvarez@users.noreply.github.com>
1 parent 5c44061 commit 35ae4c8

File tree

106 files changed

+1555
-1102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1555
-1102
lines changed

buildconfig/CMake/CppCheck_Suppressions.txt.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ constVariablePointer:${CMAKE_SOURCE_DIR}/Framework/WorkflowAlgorithms/src/HFIRLo
488488
unreadVariable:${CMAKE_SOURCE_DIR}/Framework/WorkflowAlgorithms/src/SofTwoThetaTOF.cpp:196
489489
missingOverride:${CMAKE_SOURCE_DIR}/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h:22
490490
constParameterReference:${CMAKE_SOURCE_DIR}/qt/icons/src/Icon.cpp:80
491-
constVariableReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp:80
492491
passedByValue:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.h:47
493492
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IReflMessageHandler.h:21
494493
constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.cpp:267
@@ -505,16 +504,9 @@ constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflect
505504
constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp:91
506505
constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp:95
507506
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Options/OptionsDialogModel.h:20
508-
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Preview/PreviewModel.h:31
509507
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h:66
510508
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.h:32
511509
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h:31
512-
constVariablePointer:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:510
513-
constVariableReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:749
514-
constVariableReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:754
515-
constVariableReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:785
516-
unreadVariable:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:786
517-
constVariableReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp:788
518510
virtualCallInConstructor:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h:60
519511
missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SaveAlgorithmRunner.h:18
520512
returnByReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.h:54
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- When a workspace is loaded on the ISIS Reflectometry GUI :ref:`Reduction Preview <refl_preview>` tab, region selectors are now added to the slice viewer plot to display any ROIs from matching experiment settings.

qt/python/mantidqt/mantidqt/widgets/regionselector/presenter.py

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
55
# SPDX - License - Identifier: GPL - 3.0 +
66
# This file is part of the mantid workbench.
7-
from typing import Callable
7+
from typing import Callable, Optional
88

99
from .view import RegionSelectorView
1010
from ..observers.observing_presenter import ObservingPresenter
@@ -53,7 +53,7 @@ def __init__(self, ws=None, parent=None, view=None, image_info_widget=None):
5353

5454
self.notifyee = None
5555
self.view = view if view else RegionSelectorView(self, parent, image_info_widget=image_info_widget)
56-
super().__init__(ws, self.view._data_view)
56+
super().__init__(ws, self.view.data_view)
5757
self._selectors: list[Selector] = []
5858
self._drawing_region = False
5959

@@ -143,7 +143,7 @@ def add_rectangular_region(self, region_type: str, color: str, hatch: str):
143143
if self._drawing_region:
144144
self._selectors.pop()
145145

146-
self._selectors.append(Selector(region_type, color, hatch, self.view._data_view.ax, self._on_rectangle_selected))
146+
self._selectors.append(self._create_selector(region_type, color, hatch))
147147

148148
self._drawing_region = True
149149

@@ -155,6 +155,34 @@ def get_region(self, region_type):
155155
result.extend([selector.extents[2], selector.extents[3]])
156156
return result
157157

158+
def display_rectangular_region(self, region_type: str, color: str, hatch: str, y1: float, y2: float):
159+
"""
160+
Add a rectangular region selector to the given location on the plot, if it does not already exist
161+
and if it is located within the y-axis bounds.
162+
This method currently only takes y values and will automatically set some x values.
163+
"""
164+
165+
def is_same_location(extents):
166+
return self._equal_within_tolerance(extents[2], y1) and self._equal_within_tolerance(extents[3], y2)
167+
168+
existing_selector = self._find_selector_if(lambda x: x.region_type() == region_type and is_same_location(x.extents))
169+
if existing_selector:
170+
return
171+
172+
y_min, y_max = self.view.data_view.ax.get_ybound()
173+
if y1 < y_min or y2 > y_max:
174+
return
175+
176+
# Set some values for x1 and x2
177+
x_min, x_max = self.view.data_view.ax.get_xbound()
178+
x_width = (x_max - x_min) / 4
179+
x1 = x_min + x_width
180+
x2 = x1 + x_width
181+
182+
selector = self._create_selector(region_type, color, hatch, (x1, x2, y1, y2))
183+
selector.set_active(False)
184+
self._selectors.append(selector)
185+
158186
def _initialise_dimensions(self, workspace):
159187
self.view.create_dimensions(dims_info=Dimensions.get_dimensions_info(workspace))
160188
self.view.create_axes_orthogonal(redraw_on_zoom=not WorkspaceInfo.can_support_dynamic_rebinning(workspace))
@@ -191,7 +219,7 @@ def _remove_selector(self, selector: Selector) -> None:
191219
if self.notifyee:
192220
self.notifyee.notifyRegionChanged()
193221

194-
def _find_selector_if(self, predicate: Callable) -> Selector:
222+
def _find_selector_if(self, predicate: Callable) -> Optional[Selector]:
195223
"""
196224
Find the first selector which agrees with a predicate. Return None if no selector is found
197225
:param predicate: A callable function or lambda that takes a Selector and returns a boolean
@@ -201,6 +229,10 @@ def _find_selector_if(self, predicate: Callable) -> Selector:
201229
return selector
202230
return None
203231

232+
@staticmethod
233+
def _equal_within_tolerance(val1, val2, tolerance=1e-8):
234+
return abs(val1 - val2) < tolerance
235+
204236
@staticmethod
205237
def _contains_point(extents, x, y) -> bool:
206238
"""
@@ -213,6 +245,14 @@ def _contains_point(extents, x, y) -> bool:
213245
return False
214246
return extents[0] <= x <= extents[1] and extents[2] <= y <= extents[3]
215247

248+
def _create_selector(
249+
self, region_type: str, color: str, hatch: str, extents: Optional[tuple[float, float, float, float]] = None
250+
) -> Selector:
251+
selector = Selector(region_type, color, hatch, self.view.data_view.ax, self._on_rectangle_selected)
252+
if extents:
253+
selector.extents = extents
254+
return selector
255+
216256
def get_extra_image_info_columns(self, xdata, ydata):
217257
return {}
218258

qt/python/mantidqt/mantidqt/widgets/regionselector/test/test_regionselector_presenter.py

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def setUp(self) -> None:
1818
self.patched_deps = self._ws_info_patcher.start()
1919
self.patched_deps["WorkspaceInfo"].get_ws_type.return_value = WS_TYPE.MATRIX
2020
self.mock_view = MagicMock()
21-
self.mock_view._data_view.ax._get_aspect_ratio.return_value = 1
21+
self.mock_view.data_view.ax._get_aspect_ratio.return_value = 1
2222

2323
def tearDown(self) -> None:
2424
self._ws_info_patcher.stop()
@@ -308,7 +308,67 @@ def test_cancel_drawing_region_with_no_selectors_does_not_crash(self):
308308
region_selector = RegionSelector(ws=Mock(), view=Mock())
309309
region_selector.cancel_drawing_region()
310310

311-
def _mock_selectors(self, selector_one_type="signal", selector_two_type="signal"):
311+
def test_display_rectangular_region_creates_selector(self):
312+
region_selector = RegionSelector(ws=Mock(), view=self._mock_view_with_axes_limits((2000, 10000), (0, 500)))
313+
# The expected extents should be within the axes x and y limits
314+
expected_extents = (4000, 6000, 100, 300)
315+
region_type = "test"
316+
317+
region_selector.display_rectangular_region(region_type, "black", "/", expected_extents[2], expected_extents[3])
318+
319+
self.assertEqual(1, len(region_selector._selectors))
320+
self._check_rectangular_region(region_selector._selectors[0], region_type, expected_extents)
321+
322+
def test_display_rectangular_region_y1_out_of_bounds_does_not_add_selector(self):
323+
y_limits = (200, 500)
324+
region_selector = RegionSelector(ws=Mock(), view=self._mock_view_with_axes_limits((2000, 10000), y_limits))
325+
326+
region_selector.display_rectangular_region("test", "black", "/", y_limits[0] - 50, y_limits[1])
327+
328+
self.assertEqual(0, len(region_selector._selectors))
329+
330+
def test_display_rectangular_region_y2_out_of_bounds_does_not_add_selector(self):
331+
y_limits = (200, 500)
332+
region_selector = RegionSelector(ws=Mock(), view=self._mock_view_with_axes_limits((2000, 10000), y_limits))
333+
334+
region_selector.display_rectangular_region("test", "black", "/", y_limits[0], y_limits[1] + 50)
335+
336+
self.assertEqual(0, len(region_selector._selectors))
337+
338+
def test_display_rectangular_region_does_not_add_duplicate_selector(self):
339+
region_selector = RegionSelector(ws=Mock(), view=self._mock_view_with_axes_limits((2000, 10000), (0, 500)))
340+
# The expected extents should be within the axes x and y limits
341+
expected_extents = (4000, 6000, 100, 300)
342+
region_type = "test"
343+
color = "black"
344+
hatch = "/"
345+
346+
region_selector.display_rectangular_region(region_type, color, hatch, expected_extents[2], expected_extents[3])
347+
self.assertEqual(1, len(region_selector._selectors))
348+
region_selector.display_rectangular_region(region_type, color, hatch, expected_extents[2], expected_extents[3])
349+
350+
self.assertEqual(1, len(region_selector._selectors))
351+
self._check_rectangular_region(region_selector._selectors[0], region_type, expected_extents)
352+
353+
def test_display_rectangular_region_adds_second_different_selector(self):
354+
region_selector = RegionSelector(ws=Mock(), view=self._mock_view_with_axes_limits((2000, 10000), (0, 500)))
355+
# The expected extents should be within the axes x and y limits
356+
expected_x_values = (4000, 6000)
357+
first_y_values = (100, 200)
358+
second_y_values = (300, 400)
359+
region_type = "test"
360+
color = "black"
361+
hatch = "/"
362+
363+
region_selector.display_rectangular_region(region_type, color, hatch, first_y_values[0], first_y_values[1])
364+
region_selector.display_rectangular_region(region_type, color, hatch, second_y_values[0], second_y_values[1])
365+
366+
self.assertEqual(2, len(region_selector._selectors))
367+
for i, expected_y_values in enumerate([first_y_values, second_y_values]):
368+
self._check_rectangular_region(region_selector._selectors[i], region_type, expected_x_values + expected_y_values)
369+
370+
@staticmethod
371+
def _mock_selectors(selector_one_type="signal", selector_two_type="signal"):
312372
selector_one, selector_two = Mock(), Mock()
313373
selector_one.region_type = Mock(return_value=selector_one_type)
314374
selector_two.region_type = Mock(return_value=selector_two_type)
@@ -322,6 +382,21 @@ def _mock_selectors(self, selector_one_type="signal", selector_two_type="signal"
322382

323383
return region_selector, selector_one, selector_two
324384

385+
@staticmethod
386+
def _mock_view_with_axes_limits(x_limits: tuple[float, float], y_limits: tuple[float, float]):
387+
mock_view = Mock()
388+
mock_view.data_view.ax.get_xbound.return_value = mock_view.data_view.ax.get_xlim.return_value = x_limits
389+
mock_view.data_view.ax.get_ybound.return_value = mock_view.data_view.ax.get_ylim.return_value = y_limits
390+
mock_view.data_view.ax._get_aspect_ratio.return_value = 1
391+
return mock_view
392+
393+
def _check_rectangular_region(
394+
self, selector: RegionSelector, expected_region_type: str, expected_extents: tuple[float, float, float, float], is_active=False
395+
):
396+
self.assertEqual(is_active, selector.active)
397+
self.assertEqual(expected_region_type, selector.region_type())
398+
self.assertTupleEqual(expected_extents, selector.extents)
399+
325400

326401
if __name__ == "__main__":
327402
unittest.main()

qt/python/mantidqt/mantidqt/widgets/regionselector/view.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def __init__(self, presenter, parent=None, dims_info=None, image_info_widget=Non
2828

2929
self.setWindowTitle("Region Selector")
3030

31+
@property
32+
def data_view(self):
33+
return self._data_view
34+
3135
def set_workspace(self, workspace):
3236
self._data_view.image_info_widget.setWorkspace(workspace)
3337

qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
namespace MantidQt::CustomInterfaces::ISISReflectometry {
1515

16-
Clipboard::Clipboard() : m_subtrees(boost::none), m_subtreeRoots(boost::none) {}
16+
Clipboard::Clipboard() : m_subtrees(std::nullopt), m_subtreeRoots(std::nullopt) {}
1717

18-
Clipboard::Clipboard(boost::optional<std::vector<MantidQt::MantidWidgets::Batch::Subtree>> subtrees,
19-
boost::optional<std::vector<MantidQt::MantidWidgets::Batch::RowLocation>> subtreeRoots)
20-
: m_subtrees(std::move(subtrees)), m_subtreeRoots(std::move(subtreeRoots)) {}
18+
Clipboard::Clipboard(std::vector<MantidQt::MantidWidgets::Batch::Subtree> subtrees,
19+
std::vector<MantidQt::MantidWidgets::Batch::RowLocation> subtreeRoots)
20+
: m_subtrees(std::optional(subtrees)), m_subtreeRoots(std::optional(subtreeRoots)) {}
2121

22-
bool Clipboard::isInitialized() const { return m_subtrees.is_initialized() && m_subtreeRoots.is_initialized(); }
22+
bool Clipboard::isInitialized() const { return m_subtrees.has_value() && m_subtreeRoots.has_value(); }
2323

2424
int Clipboard::numberOfRoots() const {
2525
if (!isInitialized())
@@ -77,30 +77,30 @@ Group Clipboard::createGroupForRoot(int rootIndex) const {
7777

7878
auto result = Group(groupName(rootIndex));
7979
auto rowsToAdd = createRowsForRootChildren(rootIndex);
80-
for (auto &row : rowsToAdd)
80+
for (auto const &row : rowsToAdd)
8181
result.appendRow(row);
8282
return result;
8383
}
8484

85-
std::vector<boost::optional<Row>> Clipboard::createRowsForAllRoots() const {
85+
std::vector<std::optional<Row>> Clipboard::createRowsForAllRoots() const {
8686
if (containsGroups(*this))
8787
throw std::runtime_error("Attempted to get row for group clipboard item");
8888

89-
auto result = std::vector<boost::optional<Row>>();
89+
auto result = std::vector<std::optional<Row>>();
9090
std::for_each(subtrees().cbegin(), subtrees().cend(), [this, &result](const auto &subtree) {
9191
const auto rowsToAdd = createRowsForSubtree(subtree);
9292
std::copy(rowsToAdd.cbegin(), rowsToAdd.cend(), std::back_inserter(result));
9393
});
9494
return result;
9595
}
9696

97-
std::vector<boost::optional<Row>> Clipboard::createRowsForRootChildren(int rootIndex) const {
97+
std::vector<std::optional<Row>> Clipboard::createRowsForRootChildren(int rootIndex) const {
9898
return createRowsForSubtree(subtrees()[rootIndex]);
9999
}
100100

101-
std::vector<boost::optional<Row>>
101+
std::vector<std::optional<Row>>
102102
Clipboard::createRowsForSubtree(MantidQt::MantidWidgets::Batch::Subtree const &subtree) const {
103-
auto result = std::vector<boost::optional<Row>>();
103+
auto result = std::vector<std::optional<Row>>();
104104

105105
for (auto const &row : subtree) {
106106
// Skip the root item if it is a group
@@ -111,25 +111,26 @@ Clipboard::createRowsForSubtree(MantidQt::MantidWidgets::Batch::Subtree const &s
111111
std::transform(row.cells().cbegin(), row.cells().cend(), std::back_inserter(cells),
112112
[](MantidQt::MantidWidgets::Batch::Cell const &cell) { return cell.contentText(); });
113113
auto validationResult = validateRow(cells);
114-
if (validationResult.isValid())
114+
if (validationResult.isValid()) {
115115
result.emplace_back(validationResult.assertValid());
116-
else
117-
result.emplace_back(boost::none);
116+
} else {
117+
result.emplace_back(std::nullopt);
118+
}
118119
}
119120

120121
return result;
121122
}
122123

123-
std::vector<MantidQt::MantidWidgets::Batch::Subtree> &Clipboard::mutableSubtrees() { return m_subtrees.get(); }
124+
std::vector<MantidQt::MantidWidgets::Batch::Subtree> &Clipboard::mutableSubtrees() { return m_subtrees.value(); }
124125

125-
std::vector<MantidQt::MantidWidgets::Batch::Subtree> const &Clipboard::subtrees() const { return m_subtrees.get(); }
126+
std::vector<MantidQt::MantidWidgets::Batch::Subtree> const &Clipboard::subtrees() const { return m_subtrees.value(); }
126127

127128
std::vector<MantidQt::MantidWidgets::Batch::RowLocation> const &Clipboard::subtreeRoots() const {
128-
return m_subtreeRoots.get();
129+
return m_subtreeRoots.value();
129130
}
130131

131132
std::vector<MantidQt::MantidWidgets::Batch::RowLocation> &Clipboard::mutableSubtreeRoots() {
132-
return m_subtreeRoots.get();
133+
return m_subtreeRoots.value();
133134
}
134135

135136
bool containsGroups(Clipboard const &clipboard) {

qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ class MANTIDQT_ISISREFLECTOMETRY_DLL Clipboard {
2525
};
2626

2727
Clipboard();
28-
Clipboard(boost::optional<std::vector<MantidQt::MantidWidgets::Batch::Subtree>> subtrees,
29-
boost::optional<std::vector<MantidQt::MantidWidgets::Batch::RowLocation>> subtreeRoots);
28+
Clipboard(std::vector<MantidQt::MantidWidgets::Batch::Subtree> subtrees,
29+
std::vector<MantidQt::MantidWidgets::Batch::RowLocation> subtreeRoots);
3030

3131
bool isInitialized() const;
3232
int numberOfRoots() const;
3333
bool isGroupLocation(int rootIndex) const;
3434
std::string groupName(int rootIndex) const;
3535
void setGroupName(int rootIndex, std::string const &groupName);
3636
Group createGroupForRoot(int rootIndex) const;
37-
std::vector<boost::optional<Row>> createRowsForAllRoots() const;
37+
std::vector<std::optional<Row>> createRowsForAllRoots() const;
3838

3939
std::vector<MantidQt::MantidWidgets::Batch::Subtree> const &subtrees() const;
4040
std::vector<MantidQt::MantidWidgets::Batch::Subtree> &mutableSubtrees();
@@ -44,16 +44,16 @@ class MANTIDQT_ISISREFLECTOMETRY_DLL Clipboard {
4444
private:
4545
// The subtrees for each of the roots. Note that the Rows here contain
4646
// relative paths
47-
boost::optional<std::vector<MantidQt::MantidWidgets::Batch::Subtree>> m_subtrees;
47+
std::optional<std::vector<MantidQt::MantidWidgets::Batch::Subtree>> m_subtrees;
4848
// The actual locations of the roots that were copied. This allows us to work
4949
// out the actual paths that were copied and determine whether items are rows
5050
// or groups in the reflectometry GUI sense. Note that these locations may
5151
// not be valid in the table if other edits have been made so this should
5252
// only be used for checking whether copied values were rows/groups.
53-
boost::optional<std::vector<MantidQt::MantidWidgets::Batch::RowLocation>> m_subtreeRoots;
53+
std::optional<std::vector<MantidQt::MantidWidgets::Batch::RowLocation>> m_subtreeRoots;
5454

55-
std::vector<boost::optional<Row>> createRowsForRootChildren(int rootIndex) const;
56-
std::vector<boost::optional<Row>> createRowsForSubtree(MantidQt::MantidWidgets::Batch::Subtree const &subtree) const;
55+
std::vector<std::optional<Row>> createRowsForRootChildren(int rootIndex) const;
56+
std::vector<std::optional<Row>> createRowsForSubtree(MantidQt::MantidWidgets::Batch::Subtree const &subtree) const;
5757
};
5858

5959
bool MANTIDQT_ISISREFLECTOMETRY_DLL containsGroups(Clipboard const &clipboard);

0 commit comments

Comments
 (0)