]> OCCT Git - occt.git/commitdiff
0031228: It is impossible switch off setting default names for objects inherited... IR-2020-09-11
authorgka <gka@opencascade.com>
Mon, 9 Dec 2019 15:29:06 +0000 (18:29 +0300)
committerabv <abv@opencascade.com>
Sat, 12 Sep 2020 17:42:26 +0000 (20:42 +0300)
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

src/TObj/TObj_Partition.cxx
src/TObj/TObj_Partition.hxx

index 68f3b47541c777852468ac52c516a27279161a32..0e2eb0b1bfb91177fb7973296c8d77082894375a 100644 (file)
@@ -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;
 }
index 14a7abed009f06fa513509a6ede94d21771ef691..343dd429165d17fe791315389da1bc534d331aa0 100644 (file)
@@ -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:
   /**