Skip to content
Snippets Groups Projects
Commit e705e30d authored by Mikhail Svechnikov's avatar Mikhail Svechnikov Committed by Mikhail Svechnikov
Browse files

MaskItems: rm SessionModel

parent a6ca713f
No related branches found
No related tags found
1 merge request!1336GUI: masks are not inherited from SessionItem anymore
......@@ -18,7 +18,6 @@
#include "Device/Mask/Line.h"
#include "Device/Mask/Polygon.h"
#include "Device/Mask/Rectangle.h"
#include "GUI/Model/Model/SessionModel.h"
#include "GUI/Support/XML/UtilXML.h"
#include <QRegularExpression>
......@@ -64,13 +63,11 @@ QVector<MaskItem*> MaskContainerItem::maskItems() const
void MaskContainerItem::insertMask(int row, MaskItem* maskItem)
{
maskItem->setParentAndModel(this, SessionItem::model());
m_maskItems.insert_at(row, maskItem);
}
void MaskContainerItem::addMask(MaskItem* maskItem)
{
maskItem->setParentAndModel(this, SessionItem::model());
m_maskItems.push_back(maskItem); // TODO: check whether the order of masks matter
}
......@@ -532,9 +529,7 @@ void PolygonItem::addPoint(double x, double y)
auto* pointItem = new PolygonPointItem;
pointItem->setPosX(x);
pointItem->setPosY(y);
pointItem->setParentAndModel(this, model());
m_points.push_back(pointItem); // TODO: check whether the order of points matter
// insertChild(-1, new PolygonPointItem);
}
void PolygonItem::writeTo(QXmlStreamWriter* w) const
......
......@@ -18,9 +18,10 @@
#include "GUI/Model/BaseItem/SessionItem.h"
#include "GUI/Model/CatDevice/MaskItemCatalog.h"
#include "GUI/Model/Descriptor/SelectionProperty.h"
#include "GUI/Model/Model/SessionModel.h"
#include "Base/Types/OwningVector.h"
class IShape2D;
class MessageService;
//! SessionItem with signals used in masks
......
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