From: gka Date: Mon, 9 Dec 2019 15:29:06 +0000 (+0300) Subject: 0031228: It is impossible switch off setting default names for objects inherited... X-Git-Tag: V7_5_0_beta~72 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FIR-2020-09-11;p=occt.git 0031228: It is impossible switch off setting default names for objects inherited TObj_Partition In order to switch off setting default names for objects of the type TObj_Partition argument "theSetName" defining addition of the default names was added --- diff --git a/src/TObj/TObj_Partition.cxx b/src/TObj/TObj_Partition.cxx index 68f3b47541..0e2eb0b1bf 100644 --- a/src/TObj/TObj_Partition.cxx +++ b/src/TObj/TObj_Partition.cxx @@ -31,8 +31,8 @@ IMPLEMENT_TOBJOCAF_PERSISTENCE(TObj_Partition) //purpose : //======================================================================= -TObj_Partition::TObj_Partition (const TDF_Label& theLabel) - : TObj_Object( theLabel ) +TObj_Partition::TObj_Partition (const TDF_Label& theLabel, const Standard_Boolean theSetName) + : TObj_Object( theLabel, theSetName ) { } @@ -42,10 +42,10 @@ TObj_Partition::TObj_Partition (const TDF_Label& theLabel) //======================================================================= Handle(TObj_Partition) TObj_Partition::Create - (const TDF_Label& theLabel) + (const TDF_Label& theLabel, const Standard_Boolean theSetName) { Handle(TObj_Partition) aPartition = - new TObj_Partition(theLabel); + new TObj_Partition(theLabel, theSetName); aPartition->SetLastIndex(0); return aPartition; } diff --git a/src/TObj/TObj_Partition.hxx b/src/TObj/TObj_Partition.hxx index 14a7abed00..343dd42916 100644 --- a/src/TObj/TObj_Partition.hxx +++ b/src/TObj/TObj_Partition.hxx @@ -44,7 +44,7 @@ class TObj_Partition : public TObj_Object //! Constructor is protected; //! static methods are used for creation of this type of objects - Standard_EXPORT TObj_Partition (const TDF_Label& theLabel); + Standard_EXPORT TObj_Partition (const TDF_Label& theLabel, const Standard_Boolean theSetName = Standard_True); public: /** @@ -53,7 +53,7 @@ class TObj_Partition : public TObj_Object //! Creates a new partition on given label. static Standard_EXPORT Handle(TObj_Partition) Create - (const TDF_Label& theLabel); + (const TDF_Label& theLabel, const Standard_Boolean theSetName = Standard_True); public: /**