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

get masks from gDoc

parent 3c6bdbed
No related branches found
No related tags found
1 merge request!2420mask item owned by detector instead of data
......@@ -15,6 +15,7 @@
#include "GUI/View/Canvas/MaskEditorCanvas.h"
#include "Device/Data/Datafield.h"
#include "GUI/Model/Data/Data2DItem.h"
#include "GUI/Model/Device/InstrumentsSet.h"
#include "GUI/Model/Mask/MasksSet.h"
#include "GUI/Model/Project/ProjectDocument.h"
#include "GUI/View/Canvas/SavePlotAssistant.h"
......@@ -117,9 +118,10 @@ void MaskEditorCanvas::onPresentationChange(bool pixelized)
m_data_item->setInterpolated(m_backup_interpolated);
}
if (auto* container = m_data_item->masksSet())
for (MaskItem* t : *container)
t->setIsVisible(!pixelized && t->wasVisible());
if (const InstrumentItem* ii = gDoc->instruments()->currentItem())
if (const MasksSet* s = ii->masks())
for (MaskItem* t : *s)
t->setIsVisible(!pixelized && t->wasVisible());
}
//! Saves plot into project directory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment