Skip to content
Snippets Groups Projects
Commit d0094ab9 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

revert one more <ranges>

parent 64b5a5f6
No related branches found
No related tags found
1 merge request!2185cleanup suggested by clang-tidy
Pipeline #121888 passed
......@@ -24,7 +24,6 @@
#include "GUI/Model/Mask/MaskContainerItem.h"
#include "GUI/Model/Mask/MaskItems.h"
#include "GUI/Support/XML/Backup.h"
#include <ranges>
namespace {
namespace Tag {
......@@ -69,13 +68,13 @@ std::unique_ptr<IDetector> DetectorItem::createDetector() const
if (m_maskContainerItem) {
const QVector<MaskItem*> maskItems = m_maskContainerItem->maskItems();
for (auto maskItem : std::ranges::reverse_view(maskItems)) {
if (maskItem->isVisible()) {
if (auto* ii = dynamic_cast<RegionOfInterestItem*>(maskItem)) {
for (auto maskIter = maskItems.rbegin(); maskIter != maskItems.rend(); maskIter++) {
if ((*maskIter)->isVisible()) {
if (auto* ii = dynamic_cast<RegionOfInterestItem*>(*maskIter)) {
result->setRegionOfInterest(ii->xLow(), ii->yLow(), ii->xUp(), ii->yUp());
} else {
std::unique_ptr<IShape2D> shape(maskItem->createShape());
result->addBinMask(*shape, maskItem->maskValue());
std::unique_ptr<IShape2D> shape((*maskIter)->createShape());
result->addBinMask(*shape, (*maskIter)->maskValue());
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment