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, AttrAxisType, QString().setNum(static_cast<int>(dialogTool->GetAxisType())));
doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix());
// Save for later use. // Save visibility data for later use
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); SaveVisibilityGroupData(dialogTool);
groupName = dialogTool->GetVisibilityGroupName();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

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, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId()));
doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix());
// Save for later use. // Save visibility data for later use
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); SaveVisibilityGroupData(dialogTool);
groupName = dialogTool->GetVisibilityGroupName();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -156,6 +156,9 @@ protected:
template <typename T> template <typename T>
void SetDialogVisibilityGroupData(QPointer<T> dialogTool); void SetDialogVisibilityGroupData(QPointer<T> dialogTool);
template <typename T>
void SaveVisibilityGroupData(QPointer<T> dialogTool);
void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType); void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType);
template <typename T> 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> template <typename T>
void VAbstractOperation::ShowToolVisualization(bool show) 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, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId()));
doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle()); doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle());
// Save for later use. // Save visibility data for later use
hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); SaveVisibilityGroupData(dialogTool);
groupName = dialogTool->GetVisibilityGroupName();
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

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