Fix disappearing a visibility group tags after Apply -> OK sequence.

This commit is contained in:
Roman Telezhynskyi 2020-05-07 17:02:16 +03:00
parent 0df099b4ca
commit 8aa93f8757
5 changed files with 23 additions and 12 deletions

View File

@ -226,9 +226,8 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList<quint32> &ol
doc->SetAttribute(domElement, AttrAxisType, QString().setNum(static_cast<int>(dialogTool->GetAxisType())));
doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix());
// Save for later use.
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup();
groupName = dialogTool->GetVisibilityGroupName();
// Save visibility data for later use
SaveVisibilityGroupData(dialogTool);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -213,9 +213,8 @@ void VToolFlippingByLine::SaveDialog(QDomElement &domElement, QList<quint32> &ol
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId()));
doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix());
// Save for later use.
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup();
groupName = dialogTool->GetVisibilityGroupName();
// Save visibility data for later use
SaveVisibilityGroupData(dialogTool);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -156,6 +156,9 @@ protected:
template <typename T>
void SetDialogVisibilityGroupData(QPointer<T> dialogTool);
template <typename T>
void SaveVisibilityGroupData(QPointer<T> dialogTool);
void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType);
template <typename T>
@ -197,6 +200,18 @@ void VAbstractOperation::SetDialogVisibilityGroupData(QPointer<T> dialogTool)
}
}
//---------------------------------------------------------------------------------------------------------------------
template<typename T>
void VAbstractOperation::SaveVisibilityGroupData(QPointer<T> dialogTool)
{
SCASSERT(not dialogTool.isNull())
// Save for later use.
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup();
groupName = dialogTool->GetVisibilityGroupName();
groupTags = dialogTool->GetVisibilityGroupTags();
}
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
void VAbstractOperation::ShowToolVisualization(bool show)

View File

@ -482,9 +482,8 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList<quint32> &oldDependenc
doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId()));
doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle());
// Save for later use.
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup();
groupName = dialogTool->GetVisibilityGroupName();
// Save visibility data for later use
SaveVisibilityGroupData(dialogTool);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -362,9 +362,8 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList<quint32> &oldDepen
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix());
// Save for later use.
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup();
groupName = dialogTool->GetVisibilityGroupName();
// Save visibility data for later use
SaveVisibilityGroupData(dialogTool);
}
//---------------------------------------------------------------------------------------------------------------------