修改了LayerStyle的materialStyles的类型,添加了深拷贝构造函数
parent
7c7cd02d71
commit
94b16ac536
|
@ -45,6 +45,15 @@ QWidget* StrokeElementLayerStyle::getListDisplayWidget() const
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StrokeElementLayerStyle::StrokeElementLayerStyle(StrokeElementLayerStyle& other)
|
||||||
|
{
|
||||||
|
materialStyles = std::vector<std::shared_ptr<Renderer::MaterialStyleStroke>>(other.materialStyles.size());
|
||||||
|
for (size_t i = 0; i < other.materialStyles.size(); i++)
|
||||||
|
{
|
||||||
|
materialStyles[i] = std::make_shared<Renderer::MaterialStyleStroke>(*other.materialStyles[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Renderer::BaseStyle> FillElementLayerStyle::toBaseStyles() const
|
std::vector<Renderer::BaseStyle> FillElementLayerStyle::toBaseStyles() const
|
||||||
{
|
{
|
||||||
return std::vector<Renderer::BaseStyle>();
|
return std::vector<Renderer::BaseStyle>();
|
||||||
|
@ -73,3 +82,12 @@ QWidget* FillElementLayerStyle::getListDisplayWidget() const
|
||||||
layout->addWidget(name);
|
layout->addWidget(name);
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FillElementLayerStyle::FillElementLayerStyle(FillElementLayerStyle& other)
|
||||||
|
{
|
||||||
|
materialStyles = std::vector<std::shared_ptr<Renderer::MaterialStyleFill>>(other.materialStyles.size());
|
||||||
|
for (size_t i = 0; i < other.materialStyles.size(); i++)
|
||||||
|
{
|
||||||
|
materialStyles[i] = std::make_shared<Renderer::MaterialStyleFill>(*other.materialStyles[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -34,8 +34,9 @@ public:
|
||||||
QWidget* getInputWidget() const override;
|
QWidget* getInputWidget() const override;
|
||||||
QWidget* getListDisplayWidget() const override;
|
QWidget* getListDisplayWidget() const override;
|
||||||
StrokeElementLayerStyle() = default;
|
StrokeElementLayerStyle() = default;
|
||||||
|
StrokeElementLayerStyle(StrokeElementLayerStyle& other);
|
||||||
~StrokeElementLayerStyle() = default;
|
~StrokeElementLayerStyle() = default;
|
||||||
std::vector<std::shared_ptr<Renderer::MaterialStroke>> materialStyles;
|
std::vector<std::shared_ptr<Renderer::MaterialStyleStroke>> materialStyles;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FillElementLayerStyle : public Renderer::ElementStyle, public LayerStyle
|
class FillElementLayerStyle : public Renderer::ElementStyle, public LayerStyle
|
||||||
|
@ -46,6 +47,7 @@ public:
|
||||||
QWidget* getInputWidget() const override;
|
QWidget* getInputWidget() const override;
|
||||||
QWidget* getListDisplayWidget() const override;
|
QWidget* getListDisplayWidget() const override;
|
||||||
FillElementLayerStyle() = default;
|
FillElementLayerStyle() = default;
|
||||||
|
FillElementLayerStyle(FillElementLayerStyle& other);
|
||||||
~FillElementLayerStyle() = default;
|
~FillElementLayerStyle() = default;
|
||||||
std::vector<std::shared_ptr<Renderer::MaterialFill>> materialStyles;
|
std::vector<std::shared_ptr<Renderer::MaterialStyleFill>> materialStyles;
|
||||||
};
|
};
|
Loading…
Reference in New Issue