修改引用Element的Layer的styles类型为ALL | #32
parent
4471bb3f79
commit
a0d45085dd
|
@ -81,10 +81,17 @@ FolderLayerWrapper::FolderLayerWrapper(QJsonObject json, ElementManager *element
|
||||||
LeafLayerWrapper::LeafLayerWrapper(QJsonObject json, ElementManager* elementManager, FolderLayerWrapper* parent)
|
LeafLayerWrapper::LeafLayerWrapper(QJsonObject json, ElementManager* elementManager, FolderLayerWrapper* parent)
|
||||||
: LayerWrapper(json, parent, elementManager),
|
: LayerWrapper(json, parent, elementManager),
|
||||||
wrappedElement(elementManager->getElementById(json.value("element").toInt()))
|
wrappedElement(elementManager->getElementById(json.value("element").toInt()))
|
||||||
|
{
|
||||||
|
if (typeid(*wrappedElement) == typeid(GroupElement))
|
||||||
|
{
|
||||||
|
styles = new LayerStyleContainer(ElementType::TYPE_ALL);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
styles = new LayerStyleContainer(LayerStyleContainer::fromJson(
|
styles = new LayerStyleContainer(LayerStyleContainer::fromJson(
|
||||||
wrappedElement->isClosed() ? ElementType::TYPE_CLOSED : ElementType::TYPE_UNCLOSED,
|
wrappedElement->isClosed() ? ElementType::TYPE_CLOSED : ElementType::TYPE_UNCLOSED,
|
||||||
json.value("styles").toArray()));
|
json.value("styles").toArray()));
|
||||||
|
}
|
||||||
qDebug() << json.value("name").toString() << " " << this;
|
qDebug() << json.value("name").toString() << " " << this;
|
||||||
if(wrappedElement != nullptr)
|
if(wrappedElement != nullptr)
|
||||||
wrappedElement->referencedCount++;
|
wrappedElement->referencedCount++;
|
||||||
|
|
Loading…
Reference in New Issue