Salome HOME
Added a method Modify to Study and a method SetModifyFlag to GenericAttribute. Now...
authorsrn <srn@opencascade.com>
Mon, 22 Aug 2005 11:47:49 +0000 (11:47 +0000)
committersrn <srn@opencascade.com>
Mon, 22 Aug 2005 11:47:49 +0000 (11:47 +0000)
27 files changed:
src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx
src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx
src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx
src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx
src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.cxx

index 6f87a6d347577cd9abd020cb806bb0332c997305..d31c4b4fbc437bb3001a81cfa2078982c527a970 100644 (file)
@@ -30,6 +30,7 @@ Handle(SALOMEDSImpl_AttributeComment) SALOMEDSImpl_AttributeComment::Set (const
   }
 
   A->SetValue(Val);     
+    
   return A;
 }
 
@@ -46,6 +47,8 @@ void SALOMEDSImpl_AttributeComment::SetValue (const TCollection_ExtendedString&
   Backup();
 
   myString = S;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
            
 
index 29e743acbe6a836182f9f529cd521c3e2fd3f1dd..68564dfd99179cce6c2f3bdfbbf4f4cd2bd03b5a 100644 (file)
@@ -60,6 +60,8 @@ void SALOMEDSImpl_AttributeExternalFileDef::SetValue (const TCollection_Extended
   Backup();
 
   myString = S;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
            
 
index d880e387e7fca78470d135d58d1f587cc288b698..004592bb07ba846f83d048d1bae7e46086f0ff48 100644 (file)
@@ -64,6 +64,8 @@ void SALOMEDSImpl_AttributeFileType::SetValue (const TCollection_ExtendedString&
   Backup();
 
   myString = S;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 6bfd42ec5f19ed50d17932d939abf16f4940eeeb..bf9599366550d505ca3c55ce877dd9dac03a713c 100644 (file)
@@ -62,6 +62,8 @@ void SALOMEDSImpl_AttributeIOR::SetValue(const TCollection_ExtendedString& theVa
   myString = theValue;
 
   SALOMEDSImpl_Study::IORUpdated(this);
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 89534790352e15f8ccf6986a17da1ee79698a20e..7b80aa4e67f98e4981626749d68ae86143366106 100644 (file)
@@ -43,6 +43,8 @@ void SALOMEDSImpl_AttributeInteger::SetValue(const Standard_Integer v)
 
   Backup();
   myValue = v;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 0349e53b556297628ca37a8fdd4f3f838a07e71e..240a95380d5f25758ed8ad46eb63dceeac627e24 100644 (file)
@@ -64,6 +64,8 @@ void SALOMEDSImpl_AttributeLocalID::SetValue(const Standard_Integer theValue)
   Backup();
 
   myValue = theValue;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
     
 
index 1bddef5b49e7bfee831d2bec4785ecdf325ad753..55718b771a38de9da8c46291e9ca43ac31e3d7cb 100644 (file)
@@ -46,6 +46,8 @@ void SALOMEDSImpl_AttributeName::SetValue (const TCollection_ExtendedString& S)
   Backup();
 
   myString = S;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
            
 
index 99dbd85061383509c22ec18c3e1f6bf3834484df..2db2b408846b36b62f37eeca575b56d4b2bfd022 100644 (file)
@@ -73,6 +73,8 @@ void SALOMEDSImpl_AttributePersistentRef::SetValue (const TCollection_ExtendedSt
   Backup();
 
   myString = S;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index a05e411f93f504e6244ee284628bdf8aef814c34..6b9b3a3b8d35403adc9e57dbc81945539ea61716 100644 (file)
@@ -66,6 +66,8 @@ void SALOMEDSImpl_AttributePixMap::SetPixMap (const TCollection_ExtendedString&
   Backup();
 
   myString = S;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 1963e5379aaede56e2ea78b7ac6e88c3d788ca02..a6f9db1ef24edd77bc6fa9211c757f6e4bbcd997 100644 (file)
@@ -39,6 +39,8 @@ void SALOMEDSImpl_AttributePythonObject::SetObject(const TCollection_AsciiString
   Backup();
   mySequence = theSequence;
   myIsScript = theScript;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_AsciiString SALOMEDSImpl_AttributePythonObject::GetObject() const
index e2f5ec902666881b57d9383ba89b956dbb130047..45ddd227a8f5017a0934b17fb55b4e359bcaffbc 100644 (file)
@@ -43,6 +43,8 @@ void SALOMEDSImpl_AttributeReal::SetValue(const Standard_Real v)
 
   Backup();
   myValue = v;  
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 4d3250b2afcbed5f7420f0665e9f2dea63ec4be2..019835cbcf9c723853a23c683d2cde337f2fc761 100644 (file)
@@ -48,6 +48,8 @@ void SALOMEDSImpl_AttributeReference::Set(const TDF_Label& Origin)
 
   Backup();
   myLabel = Origin;
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }  
 
 //=======================================================================
index 3a0b50c2cd5dadf86589e4578d410c88e1efc7ce..ca16677028307d52ada39087f4f8173c4e45c0e2 100644 (file)
@@ -106,6 +106,8 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::Assign(const Handle(TColStd_HSeque
   Backup();
   if (myValue.IsNull()) myValue = new TColStd_HSequenceOfInteger;
   myValue->ChangeSequence() = other->Sequence();
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfInteger::ChangeValue(const Standard_Integer Index,const Standard_Integer Value) 
@@ -113,6 +115,8 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::ChangeValue(const Standard_Integer
   CheckLocked();  
   Backup();
   myValue->SetValue(Index, Value);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfInteger::Add(const Standard_Integer Value) 
@@ -120,6 +124,8 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::Add(const Standard_Integer Value)
   CheckLocked();  
   Backup();
   myValue->Append(Value);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfInteger::Remove(const Standard_Integer Index) 
@@ -127,6 +133,8 @@ void SALOMEDSImpl_AttributeSequenceOfInteger::Remove(const Standard_Integer Inde
   CheckLocked();  
   Backup();
   myValue->Remove(Index);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Standard_Integer SALOMEDSImpl_AttributeSequenceOfInteger::Length() 
index 9ef1fafba215ff445fb68a34ae3981e8d3b8d97a..fa7caff519ad7ca6a0cf7c777f80ea14570a404f 100644 (file)
@@ -105,6 +105,8 @@ void SALOMEDSImpl_AttributeSequenceOfReal::Assign(const Handle(TColStd_HSequence
   Backup();
   if (myValue.IsNull()) myValue = new TColStd_HSequenceOfReal;
   myValue->ChangeSequence() = other->Sequence();
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfReal::ChangeValue(const Standard_Integer Index,const Standard_Real Value) 
@@ -112,6 +114,8 @@ void SALOMEDSImpl_AttributeSequenceOfReal::ChangeValue(const Standard_Integer In
   CheckLocked();  
   Backup();
   myValue->SetValue(Index, Value);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfReal::Add(const Standard_Real Value) 
@@ -119,6 +123,8 @@ void SALOMEDSImpl_AttributeSequenceOfReal::Add(const Standard_Real Value)
   CheckLocked();  
   Backup();
   myValue->Append(Value);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeSequenceOfReal::Remove(const Standard_Integer Index) 
@@ -126,6 +132,8 @@ void SALOMEDSImpl_AttributeSequenceOfReal::Remove(const Standard_Integer Index)
   CheckLocked();  
   Backup();
   myValue->Remove(Index);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Standard_Integer SALOMEDSImpl_AttributeSequenceOfReal::Length() 
index c5a0e9fde1d8ad2a7694015e2df1cf57f4509545..33c6cd971554ba8ed8e26fd6191e04cf59208cf1 100644 (file)
@@ -82,6 +82,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetNbColumns(const Standard_Integer t
   while (myCols->Length() < myNbColumns) { // append empty columns titles
     myCols->Append(TCollection_ExtendedString(""));
   }
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+
 }
 
 void SALOMEDSImpl_AttributeTableOfInteger::SetTitle(const TCollection_ExtendedString& theTitle) 
@@ -89,6 +92,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetTitle(const TCollection_ExtendedSt
   CheckLocked();  
   Backup();
   myTitle = theTitle;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfInteger::GetTitle() const 
@@ -114,6 +119,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowData(const Standard_Integer the
   }
 
   if(theRow > myNbRows) myNbRows = theRow;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfInteger) SALOMEDSImpl_AttributeTableOfInteger::GetRowData(const Standard_Integer theRow)
@@ -141,6 +148,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitle(const Standard_Integer th
     aTitle += aUnit;
   }
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnit(const Standard_Integer theRow,
@@ -153,6 +162,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnit(const Standard_Integer the
   aTitle += theUnit;
 
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
@@ -160,6 +171,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const Handle(TColStd_HSeq
   if (theUnits->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
   int aLength = theUnits->Length(), i;
   for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetRowUnits()
@@ -175,6 +188,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitles(const Handle(TColStd_HSe
   if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetRowTitles()
@@ -217,6 +232,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnData(const Standard_Integer
       myRows->Append(TCollection_ExtendedString(""));
     }
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 
@@ -243,6 +260,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitle(const Standard_Integer
   Backup();
   while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
   myCols->SetValue(theColumn,theTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitle(const Standard_Integer theColumn) const 
@@ -257,6 +276,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const Handle(TColStd_
   if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++)  myCols->SetValue(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitles()
@@ -293,6 +314,8 @@ void SALOMEDSImpl_AttributeTableOfInteger::PutValue(const Standard_Integer theVa
     }
     myNbRows = theRow;
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Standard_Boolean SALOMEDSImpl_AttributeTableOfInteger::HasValue(const Standard_Integer theRow,
index 32b20050f9c24a3b0734fbc094f7ab22fd08344a..a5767647226a8496e23c99f68e19d8b0b2ecacac 100644 (file)
@@ -83,6 +83,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetNbColumns(const Standard_Integer theN
   while (myCols->Length() < myNbColumns) { // append empty columns titles
     myCols->Append(TCollection_ExtendedString(""));
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfReal::SetTitle(const TCollection_ExtendedString& theTitle) 
@@ -90,6 +92,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetTitle(const TCollection_ExtendedStrin
   CheckLocked();  
   Backup();
   myTitle = theTitle;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfReal::GetTitle() const 
@@ -115,6 +119,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowData(const Standard_Integer theRow
   }
 
   if(theRow > myNbRows) myNbRows = theRow;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfReal) SALOMEDSImpl_AttributeTableOfReal::GetRowData(const Standard_Integer theRow)
@@ -143,6 +149,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowTitle(const Standard_Integer theRo
     aTitle += aUnit;
   }
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const Standard_Integer theRow,
@@ -155,6 +163,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const Standard_Integer theRow
   aTitle += theUnit;
 
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
@@ -162,6 +172,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const Handle(TColStd_HSequen
   if (theUnits->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
   int aLength = theUnits->Length(), i;
   for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetRowUnits()
@@ -177,6 +189,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const Handle(TColStd_HSeque
   if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetRowTitles()
@@ -218,6 +232,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnData(const Standard_Integer the
       myRows->Append(TCollection_ExtendedString(""));
     }
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 
@@ -244,6 +260,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitle(const Standard_Integer th
   Backup();
   while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
   myCols->SetValue(theColumn,theTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfReal::GetColumnTitle(const Standard_Integer theColumn) const 
@@ -258,6 +276,8 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const Handle(TColStd_HSe
   if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++)  myCols->SetValue(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfReal::GetColumnTitles()
@@ -294,6 +314,8 @@ void SALOMEDSImpl_AttributeTableOfReal::PutValue(const Standard_Real theValue,
     }
     myNbRows = theRow;
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Standard_Boolean SALOMEDSImpl_AttributeTableOfReal::HasValue(const Standard_Integer theRow,
index 3ca69a22f8771a8675d9d5a4a1496fdb92f5fda9..9aca85190c2ce062d941d8100d80eb116ed6a463 100644 (file)
@@ -84,6 +84,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetNbColumns(const Standard_Integer th
   while (myCols->Length() < myNbColumns) { // append empty columns titles
     myCols->Append(TCollection_ExtendedString(""));
   }
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const Standard_Integer theRow,
@@ -97,6 +99,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowTitle(const Standard_Integer the
     aTitle += aUnit;
   }
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const Standard_Integer theRow,
@@ -109,6 +113,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const Standard_Integer theR
   aTitle += theUnit;
 
   myRows->SetValue(theRow, aTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits)
@@ -131,6 +137,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const Handle(TColStd_HSeq
   if (theTitles->Length() != GetNbRows()) Standard_Failure::Raise("Invalid number of rows");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetRowTitles()
@@ -171,6 +179,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowData(const Standard_Integer theR
   }
 
   if(theRow > myNbRows) myNbRows = theRow;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 void SALOMEDSImpl_AttributeTableOfString::SetTitle(const TCollection_ExtendedString& theTitle) 
@@ -178,6 +188,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetTitle(const TCollection_ExtendedStr
   CheckLocked();  
   Backup();
   myTitle = theTitle;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetTitle() const 
@@ -218,6 +230,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const Standard_Integer t
       myRows->Append(TCollection_ExtendedString(""));
     }
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 
@@ -244,6 +258,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnTitle(const Standard_Integer
   Backup();
   while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
   myCols->SetValue(theColumn,theTitle);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 TCollection_ExtendedString SALOMEDSImpl_AttributeTableOfString::GetColumnTitle(const Standard_Integer theColumn) const 
@@ -259,6 +275,8 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const Handle(TColStd_H
   if (theTitles->Length() != myNbColumns) Standard_Failure::Raise("Invalid number of columns");
   int aLength = theTitles->Length(), i;
   for(i = 1; i <= aLength; i++)  myCols->SetValue(i, theTitles->Value(i));
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Handle(TColStd_HSequenceOfExtendedString) SALOMEDSImpl_AttributeTableOfString::GetColumnTitles()
@@ -296,6 +314,8 @@ void SALOMEDSImpl_AttributeTableOfString::PutValue(const TCollection_ExtendedStr
     }
     myNbRows = theRow;
   }
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 Standard_Boolean SALOMEDSImpl_AttributeTableOfString::HasValue(const Standard_Integer theRow,
index 4b472467d091f7ec8eef5aa0066b5be89ef9bec4..b12c6537fa4e18781595085b132a0e2e31a802d1 100644 (file)
@@ -60,6 +60,8 @@ void SALOMEDSImpl_AttributeTarget::SetRelation(const TCollection_ExtendedString&
 
   Backup();
   myRelation = theRelation; 
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
@@ -76,6 +78,8 @@ void SALOMEDSImpl_AttributeTarget::Add(const Handle(SALOMEDSImpl_SObject)& theSO
     for(;anIter.More();anIter.Next()) if(anIter.Value()->Label() == aRefLabel) return; //BugID: PAL6192    
     GetVariables().Append(aReference);
   } 
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
@@ -109,6 +113,8 @@ void SALOMEDSImpl_AttributeTarget::Remove(const Handle(SALOMEDSImpl_SObject)& th
       return;
     }
   }  
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
index 473d8385363bf22618c0fcc3aef3dcea6e75c899..8fd46859d2c7487888e7b27c23736153ed09106f 100644 (file)
@@ -46,6 +46,8 @@ void SALOMEDSImpl_AttributeTextColor::SetTextColor(const Standard_Real R, const
    myValue->SetValue(1, R);
    myValue->SetValue(2, G);
    myValue->SetValue(3, B);
+   
+   SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
@@ -67,6 +69,8 @@ void SALOMEDSImpl_AttributeTextColor::ChangeArray(const Handle(TColStd_HArray1Of
 
   for(int i = 1; i <= 3; i++)
     myValue->SetValue(i, newArray->Value(i));
+    
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved     
 }    
 
 //=======================================================================
index cde769bc8f027328a584a5c019721cf5c1c091b9..fd9615b7ac8066ea6b7118015deaaff119e511a5 100644 (file)
@@ -57,6 +57,8 @@ void SALOMEDSImpl_AttributeTextHighlightColor::SetTextHighlightColor(const Stand
    myValue->SetValue(1, R);
    myValue->SetValue(2, G);
    myValue->SetValue(3, B);
+   
+   SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
            
 //=======================================================================
@@ -78,6 +80,8 @@ void SALOMEDSImpl_AttributeTextHighlightColor::ChangeArray(const Handle(TColStd_
 
   for(int i = 1; i <= 3; i++)
     myValue->SetValue(i, newArray->Value(i));
+
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved  
 }    
 
 //=======================================================================
index 51a2b23a4db440a1b1106812a81d79d44aefbe47..9e825814f33aa4236a4069e17519d81339a43ba1 100644 (file)
@@ -86,6 +86,9 @@ Standard_Boolean SALOMEDSImpl_AttributeTreeNode::Append (const Handle(SALOMEDSIm
   }
   // Set Father
   TN->SetFather(this);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+  
   return !TN.IsNull();
 }
 
@@ -111,6 +114,9 @@ Standard_Boolean SALOMEDSImpl_AttributeTreeNode::Prepend (const Handle(SALOMEDSI
   }
   TN->SetFather(this);
   SetFirst(TN);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+  
   return !TN.IsNull();
 }                     
 
@@ -136,6 +142,9 @@ Standard_Boolean SALOMEDSImpl_AttributeTreeNode::InsertBefore (const Handle(SALO
     GetPrevious()->SetNext(TN);
 
   SetPrevious(TN);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+  
   return !TN.IsNull();
 }
 
@@ -157,6 +166,9 @@ Standard_Boolean SALOMEDSImpl_AttributeTreeNode::InsertAfter (const Handle(SALOM
   if (HasNext()) GetNext()->SetPrevious(TN);
 
   SetNext(TN);
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+  
   return !TN.IsNull();
 }         
 
@@ -197,6 +209,8 @@ Standard_Boolean SALOMEDSImpl_AttributeTreeNode::Remove ()
   SetNext(bid);
   SetPrevious(bid);
 
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
+
   return Standard_True;
 }         
 
@@ -223,6 +237,8 @@ Standard_Integer SALOMEDSImpl_AttributeTreeNode::Depth () const
 void SALOMEDSImpl_AttributeTreeNode::SetTreeID (const Standard_GUID& explicitID)
 {
   myTreeID = explicitID;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 
@@ -306,6 +322,8 @@ void SALOMEDSImpl_AttributeTreeNode::SetFather(const Handle(SALOMEDSImpl_Attribu
   CheckLocked();
   Backup();
   myFather = F;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
@@ -317,6 +335,8 @@ void SALOMEDSImpl_AttributeTreeNode::SetNext(const Handle(SALOMEDSImpl_Attribute
   CheckLocked();
   Backup();
   myNext = F;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 
@@ -329,6 +349,8 @@ void SALOMEDSImpl_AttributeTreeNode::SetPrevious(const Handle(SALOMEDSImpl_Attri
   CheckLocked();
   Backup();
   myPrevious = F;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }
 
 //=======================================================================
@@ -340,6 +362,8 @@ void SALOMEDSImpl_AttributeTreeNode::SetFirst(const Handle(SALOMEDSImpl_Attribut
   CheckLocked();
   Backup();
   myFirst = F;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }         
 
 //=======================================================================
index 5b5e8685c044fa3107674f5cfb92ba1a66aca371..41fcd0c8f29ad607b897a3dedd4f8b86b4876db6 100644 (file)
@@ -40,6 +40,8 @@ void SALOMEDSImpl_AttributeUserID::SetValue( const Standard_GUID&  guid)
 
   Backup();
   myID = guid;
+  
+  SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved 
 }        
 
 //=======================================================================
index 9c8f1f2bda21d0e7c21f24b936ba684f6b678f8b..6f2384fb60499ce3057271c52892094a5d020478 100644 (file)
@@ -55,3 +55,13 @@ Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_GenericAttribute::GetSObject()
   if(aLabel.IsNull()) return NULL;
   return SALOMEDSImpl_Study::SObject(aLabel);
 }
+
+void SALOMEDSImpl_GenericAttribute::SetModifyFlag()
+{
+   TDF_Label aLabel = Label();
+   if(aLabel.IsNull()) return; 
+
+  Handle(SALOMEDSImpl_Study) aStudy = SALOMEDSImpl_Study::GetStudy(aLabel);
+  if(!aStudy.IsNull()) aStudy->Modify();
+}
+
index 9ed1f341f2d1a89400f064084289efbde760662a..47c1cc9e9ae41249b2b38e380e4199726092c1dd 100644 (file)
@@ -37,6 +37,7 @@ Standard_EXPORT virtual TCollection_AsciiString Type();
 Standard_EXPORT virtual void CheckLocked();
 Standard_EXPORT TCollection_AsciiString GetClassType() { return _type; }
 Standard_EXPORT Handle(SALOMEDSImpl_SObject) GetSObject();
+Standard_EXPORT void SetModifyFlag();
 
 Standard_EXPORT static char* Impl_GetType(const Handle(TDF_Attribute)& theAttr); 
 Standard_EXPORT static char* Impl_GetClassType(const Handle(TDF_Attribute)& theAttr);
index 6f63d4d5a60800141fa243123939d6bdbb67a71f..703e44a085b5c47f0852da86752aad6fb5c5a069 100644 (file)
@@ -1464,3 +1464,9 @@ void dumpSO(const Handle(SALOMEDSImpl_SObject)& theSO,
 
   return;
 }
+
+void SALOMEDSImpl_Study::Modify()
+{
+  _errorCode = ""; 
+  _doc->Modify();
+}
index a39ebf1e2f317e1d41d2097005451c4aa6a912c6..dd986a7ff21ffc760da72a2f3eaf409fd2342172 100644 (file)
@@ -246,6 +246,9 @@ public:
   //The method dump creates a txt file that contain a dump of the study, for debug use
   Standard_EXPORT void dump(const TCollection_AsciiString& theFileName);
 
+  //This method marks the study as being modified
+  Standard_EXPORT void Modify();
+
 public:
   DEFINE_STANDARD_RTTI( SALOMEDSImpl_Study )
 
index 80f42b13235c6aef200cd6ec11fd32f9acbecd8a..c2f21e3e5f2e66428db73d3f217a946498bf86de 100644 (file)
@@ -565,8 +565,6 @@ bool SALOMEDSImpl_StudyBuilder::Addreference(const Handle(SALOMEDSImpl_SObject)&
 
   if(!_callbackOnRemove.IsNull() && Lab.IsDescendant(_doc->Main())) _callbackOnRemove->OnRemoveSObject(me);
   
-  _doc->Modify();  
-  
   return true;
 }