Salome HOME
Update mechanism is corrected (Bug #182).
authoradv <adv@opencascade.com>
Thu, 5 Dec 2013 11:52:32 +0000 (11:52 +0000)
committeradv <adv@opencascade.com>
Thu, 5 Dec 2013 11:52:32 +0000 (11:52 +0000)
25 files changed:
src/HYDROData/HYDROData_Bathymetry.cxx
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_CalculationCase.h
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Image.cxx
src/HYDROData/HYDROData_ImmersibleZone.cxx
src/HYDROData/HYDROData_ImmersibleZone.h
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_Profile.cxx
src/HYDROData/HYDROData_Tool.cxx
src/HYDROData/HYDROData_Tool.h
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_CalculationOp.cxx
src/HYDROGUI/HYDROGUI_ImmersibleZoneOp.cxx
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/HYDROGUI_ProfileOp.cxx
src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx [deleted file]
src/HYDROGUI/HYDROGUI_UpdateImageOp.h [deleted file]
src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_UpdateObjectOp.h [new file with mode: 0644]
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 3d5e9ca53eb9ab7d9418c5a42708a711ae2527a5..2cacf6f0d96a5e8dd7a398fb5101ed1f4c8e3e0a 100644 (file)
@@ -86,14 +86,20 @@ void HYDROData_Bathymetry::SetAltitudePoints( const AltitudePoints& thePoints )
     aCoordsArray->SetValue( i * 3 + 1, aPoint.Y() );
     aCoordsArray->SetValue( i * 3 + 2, aPoint.Z() );
   }
+
+  SetToUpdate( true );
 }
 
 HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints() const
 {
   AltitudePoints aPoints;
 
+  TDF_Label aLabel = myLab.FindChild( DataTag_AltitudePoints, false );
+  if ( aLabel.IsNull() )
+    return aPoints;
+
   Handle(TDataStd_RealArray) aCoordsArray;
-  if ( !myLab.FindChild( DataTag_AltitudePoints ).FindAttribute( TDataStd_RealArray::GetID(), aCoordsArray ) )
+  if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aCoordsArray ) )
     return aPoints;
 
   for ( int i = aCoordsArray->Lower(), n = aCoordsArray->Upper(); i <= n; )
@@ -114,8 +120,12 @@ HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints() c
 
 void HYDROData_Bathymetry::RemoveAltitudePoints()
 {
-  TDF_Label aLab = myLab.FindChild( DataTag_AltitudePoints );
-  aLab.ForgetAllAttributes();
+  TDF_Label aLabel = myLab.FindChild( DataTag_AltitudePoints, false );
+  if ( !aLabel.IsNull() )
+  {
+    aLabel.ForgetAllAttributes();
+    SetToUpdate( true );
+  }
 }
 
 void interpolateAltitudeForPoints( const gp_XY&                               thePoint,
index e3c408012df7bc11a0a90a9526f7638ae8e3b4e6..c1b324457db24d06be63a4376b6e79b417f67894 100644 (file)
@@ -139,8 +139,10 @@ HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetAllReferenceObjects()
   return aResSeq;
 }
 
-void HYDROData_CalculationCase::SplitGeometryObjects()
+void HYDROData_CalculationCase::Update()
 {
+  HYDROData_Entity::Update();
+
   // At first we remove previously created regions
   RemoveRegions();
 
@@ -194,9 +196,6 @@ void HYDROData_CalculationCase::SplitGeometryObjects()
       aRegionZone->AddGeometryObject( aRefObject );
     }
   }
-
-  // The splitted data is up to date
-  SetToUpdate( false );
 }
 
 bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object)& theObject )
index 83d75bbeab969b72f10f63a9f6982b7d3d580b40..f6787a2790e790d0c8d0f21e43b2c08427c36bd6 100644 (file)
@@ -56,6 +56,12 @@ public:
    */
   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
 
+  /**
+   * Update the calcualtion case object.
+   * Call this method whenever you made changes for object data.
+   */
+  HYDRODATA_EXPORT virtual void Update();
+
   /**
    * Returns the list of all reference objects of this object.
    */
@@ -64,12 +70,6 @@ public:
 public:      
   // Public methods to work with Calculation
 
-  /**
-   * Split reference geometry objects to non-intersected regions.
-   */
-  HYDRODATA_EXPORT virtual void SplitGeometryObjects();
-
-
   /**
    * Add new one reference geometry object for calculation case.
    */
index 015cb0f7e17d73c4782107a1c3d8e6fa943e272a..126f6dffbe261bae936a9679b339359fac4dfb3a 100644 (file)
@@ -2,6 +2,7 @@
 #include "HYDROData_Entity.h"
 
 #include "HYDROData_Iterator.h"
+#include "HYDROData_Tool.h"
 
 #include <TDataStd_Name.hxx>
 #include <TDataStd_ByteArray.hxx>
@@ -55,6 +56,7 @@ QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjec
 
 void HYDROData_Entity::Update()
 {
+  SetToUpdate( false );
 }
 
 QVariant HYDROData_Entity::GetDataVariant()
@@ -62,11 +64,21 @@ QVariant HYDROData_Entity::GetDataVariant()
   return QVariant();
 }
 
-void HYDROData_Entity::SetToUpdate(bool theFlag)
+void HYDROData_Entity::SetToUpdate( bool theFlag )
 {
+  if ( IsMustBeUpdated() == theFlag )
+    return;
+
   if ( theFlag )
   {
     TDataStd_UAttribute::Set( myLab, GUID_MUST_BE_UPDATED );
+
+    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+    if ( !aDocument.IsNull() )
+    {
+      // Change the states of this and all depended objects
+      HYDROData_Tool::SetMustBeUpdatedObjects( aDocument );
+    }
   }
   else
   {
index e589ae9cbec11205a3d233c17013a183b29f6820..c8fb2713479a1eeed0573a1590d1ebd514f24454 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "HYDROData_Document.h"
 #include "HYDROData_Lambert93.h"
-#include "HYDROData_Tool.h"
 #include "HYDROData_OperationsFactory.h"
 
 #include <TDataStd_RealArray.hxx>
@@ -152,12 +151,21 @@ QStringList HYDROData_Image::DumpToPython( MapOfTreatedObjects& theTreatedObject
 
 void HYDROData_Image::Update()
 {
+  bool anIsToUpdate = IsMustBeUpdated();
+
+  HYDROData_Entity::Update();
+
+  if ( !anIsToUpdate )
+    return;
+
   HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
 
   ImageComposer_Operator* anOp = aFactory->Operator( OperatorName() );
   if ( anOp ) // Update image if there is an operation
   {
     // Fill by arguments and process the operation
+    anOp->setBinArgs( Args() );
+
     QVariant anObj1, anObj2;
     int aNbReferences = NbReferences();
 
@@ -193,15 +201,6 @@ void HYDROData_Image::Update()
   {
     UpdateTrsf();
   }
-
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
-  if ( !aDocument.IsNull() )
-  {
-    // Change the states of this and all depended images
-    SetToUpdate( true );
-    HYDROData_Tool::SetMustBeUpdatedImages( aDocument );
-    SetToUpdate( false );
-  }
 }
 
 QVariant HYDROData_Image::GetDataVariant()
@@ -233,27 +232,32 @@ HYDROData_SequenceOfObjects HYDROData_Image::GetAllReferenceObjects() const
 
 void HYDROData_Image::SetImage(const QImage& theImage)
 {
-  if (theImage.isNull()) {
+  if ( theImage.isNull() )
+  {
     // for empty image remove all previously stored attributes
     myLab.ForgetAttribute(TDataStd_IntegerArray::GetID());
     myLab.ForgetAttribute(TDataStd_ByteArray::GetID());
-    return;
   }
-  // store width, height, bytes per line and format in integer array 
-  Handle(TDataStd_IntegerArray) aParams;
-  if (!myLab.FindAttribute(TDataStd_IntegerArray::GetID(), aParams)) {
-    aParams = TDataStd_IntegerArray::Set(myLab, 1, 4);
+  else
+  {
+    // store width, height, bytes per line and format in integer array 
+    Handle(TDataStd_IntegerArray) aParams;
+    if (!myLab.FindAttribute(TDataStd_IntegerArray::GetID(), aParams)) {
+      aParams = TDataStd_IntegerArray::Set(myLab, 1, 4);
+    }
+    aParams->SetValue(1, theImage.width());
+    aParams->SetValue(2, theImage.height());
+    aParams->SetValue(3, theImage.bytesPerLine());
+    aParams->SetValue(4, (int)(theImage.format()));
+    // store data of image in byte array
+    const char* aData = (const char*)(theImage.bits());
+    SaveByteArray(0, aData, theImage.byteCount());
   }
-  aParams->SetValue(1, theImage.width());
-  aParams->SetValue(2, theImage.height());
-  aParams->SetValue(3, theImage.bytesPerLine());
-  aParams->SetValue(4, (int)(theImage.format()));
-  // store data of image in byte array
-  const char* aData = (const char*)(theImage.bits());
-  SaveByteArray(0, aData, theImage.byteCount());
+
+  SetToUpdate( true );
 }
 
-bool HYDROData_Image::LoadImage(const QString& theFilePath)
+bool HYDROData_Image::LoadImage( const QString& theFilePath )
 {
   QImage anImage( theFilePath );
   SetImage( anImage );
@@ -274,10 +278,12 @@ QImage HYDROData_Image::Image()
   return aResult;
 }
 
-void HYDROData_Image::SetFilePath(const QString& theFilePath)
+void HYDROData_Image::SetFilePath( const QString& theFilePath )
 {
   TCollection_AsciiString anAsciiStr( theFilePath.toStdString().c_str() );
   TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), anAsciiStr );
+
+  SetToUpdate( true );
 }
 
 QString HYDROData_Image::GetFilePath() const
@@ -312,6 +318,8 @@ void HYDROData_Image::SetTrsf(const QTransform& theTrsf)
   anArray->SetValue(7, theTrsf.m31());
   anArray->SetValue(8, theTrsf.m32());
   anArray->SetValue(9, theTrsf.m33());
+
+  SetToUpdate( true );
 }
 
 QTransform HYDROData_Image::Trsf() const
@@ -451,13 +459,14 @@ void HYDROData_Image::RemoveAllReferences()
     SetIsSelfSplitted( false );
   }
 
-  SetToUpdate( false );
-
   bool anIsByTwoPoints = IsByTwoPoints();
 
   QImage anImage = Image();
   if ( anImage.isNull() )
+  {
+    SetToUpdate( false );
     return;
+  }
 
   // Set local points to default position
   QPoint aLocalPointA = QPoint( 0, 0 );
@@ -475,6 +484,8 @@ void HYDROData_Image::RemoveAllReferences()
                                           QPointF( aTransform.map( aLocalPointC ) );
 
   SetGlobalPoints( ManualCartesian, aTrsfPointA, aTrsfPointB, aTrsfPointC );
+
+  SetToUpdate( false );
 }
 
 void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
@@ -497,6 +508,8 @@ void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
 
   if ( theIsUpdate )
     UpdateTrsf();
+
+  SetToUpdate( true );
 }
 
 bool HYDROData_Image::GetLocalPoints( QPoint& thePointA,
@@ -551,31 +564,7 @@ void HYDROData_Image::SetGlobalPoints( const TransformationMode& theMode,
   if ( theIsUpdate )
     UpdateTrsf();
 
-  /*
-  if( anIsRefImage )
-  {
-    aCPointA = QPointF( aTransform.map( aPointA ) );
-    aCPointB = QPointF( aTransform.map( aPointB ) );
-    aCPointC = QPointF( aTransform.map( aPointC ) );
-
-    // compute Lambert93 points
-    xca = aCPointA.x();
-    yca = aCPointA.y();
-    xcb = aCPointB.x();
-    ycb = aCPointB.y();
-    xcc = aCPointC.x();
-    ycc = aCPointC.y();
-
-    double xla = 0, yla = 0, xlb = 0, ylb = 0, xlc = 0, ylc = 0;
-    HYDROData_Lambert93::toGeo( xca, yca, yla, xla );
-    HYDROData_Lambert93::toGeo( xcb, ycb, ylb, xlb );
-    HYDROData_Lambert93::toGeo( xcc, ycc, ylc, xlc );
-
-    aLPointA = QPointF( xla * 3600.0, yla * 3600.0 ); // convert degrees to seconds
-    aLPointB = QPointF( xlb * 3600.0, ylb * 3600.0 ); // convert degrees to seconds
-    aLPointC = QPointF( xlc * 3600.0, ylc * 3600.0 ); // convert degrees to seconds
-  }
-  */
+  SetToUpdate( true );
 }
 
 bool HYDROData_Image::GetGlobalPoints( TransformationMode& theMode,
@@ -653,6 +642,7 @@ bool HYDROData_Image::HasReferencePoints() const
 void HYDROData_Image::SetTrsfMode( const TransformationMode& theMode )
 {
   TDataStd_Integer::Set( myLab.FindChild( DataTag_TrsfMode ), (int)theMode );
+  SetToUpdate( true );
 }
 
 HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
@@ -673,6 +663,7 @@ HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
 void HYDROData_Image::SetTrsfReferenceImage( const Handle(HYDROData_Image)& theRefImage )
 {
   SetReferenceObject( theRefImage, DataTag_TrsfImage );
+  SetToUpdate( true );
 }
 
 Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
@@ -682,12 +673,14 @@ Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
 
 void HYDROData_Image::RemoveTrsfReferenceImage()
 {
-  return RemoveReferenceObject( DataTag_TrsfImage );
+  RemoveReferenceObject( DataTag_TrsfImage );
+  SetToUpdate( true );
 }
 
 void HYDROData_Image::AppendReference( const Handle(HYDROData_Entity)& theReferenced )
 {
   AddReferenceObject( theReferenced, 0 );
+  SetToUpdate( true );
 }
 
 int HYDROData_Image::NbReferences() const
@@ -704,22 +697,26 @@ void HYDROData_Image::ChangeReference(
     const int theIndex, Handle(HYDROData_Entity) theReferenced)
 {
   SetReferenceObject( theReferenced, 0, theIndex );
+  SetToUpdate( true );
 }
 
 void HYDROData_Image::RemoveReference(const int theIndex)
 {
   RemoveReferenceObject( 0, theIndex );
+  SetToUpdate( true );
 }
 
 void HYDROData_Image::ClearReferences()
 {
   ClearReferenceObjects( 0 );
+  SetToUpdate( true );
 }
 
 void HYDROData_Image::SetOperatorName( const QString theOpName )
 {
   TCollection_AsciiString anAsciiStr( theOpName.toStdString().c_str() );
   TDataStd_AsciiString::Set( myLab.FindChild( DataTag_Operator ), anAsciiStr );
+  SetToUpdate( true );
 }
 
 QString HYDROData_Image::OperatorName() const
@@ -740,6 +737,7 @@ QString HYDROData_Image::OperatorName() const
 void HYDROData_Image::SetArgs(const QByteArray& theArgs)
 {
   SaveByteArray(DataTag_Operator, theArgs.constData(), theArgs.length());
+  SetToUpdate( true );
 }
 
 QByteArray HYDROData_Image::Args() const
@@ -758,6 +756,7 @@ void HYDROData_Image::SetIsSelfSplitted(bool theFlag)
   } else {
     myLab.ForgetAttribute(GUID_SELF_SPLITTED);
   }
+  SetToUpdate( true );
 }
 
 bool HYDROData_Image::IsSelfSplitted() const
@@ -770,7 +769,7 @@ QPointF HYDROData_Image::generateThirdPoint( const QPointF& thePointA,
                                              const bool&    theIsLocal ) const
 {
   // Rotate vector to 90 degrees : clockwise - for local
-  //                               anticlockwise - for global
+  //                               counterclockwise - for global
   const double aTheta = theIsLocal ? -M_PI_2 : M_PI_2;
 
   QPointF aResPoint;
index cf4375de071ad75da5cab1d645d7a8bd9077c740..38b83a61a1f920dbf06a392ba240d5871d6cc7f0 100644 (file)
@@ -87,6 +87,19 @@ HYDROData_SequenceOfObjects HYDROData_ImmersibleZone::GetAllReferenceObjects() c
 }
 
 TopoDS_Shape HYDROData_ImmersibleZone::GetTopShape() const
+{
+  return getTopShape();
+}
+
+void HYDROData_ImmersibleZone::Update()
+{
+  HYDROData_NaturalObject::Update();
+  
+  TopoDS_Shape aResShape = generateTopShape();
+  SetTopShape( aResShape );
+}
+
+TopoDS_Shape HYDROData_ImmersibleZone::generateTopShape() const
 {
   TopoDS_Shape aResShape = TopoDS_Face();
 
@@ -176,6 +189,7 @@ QColor HYDROData_ImmersibleZone::DefaultBorderColor()
 void HYDROData_ImmersibleZone::SetPolyline( const Handle(HYDROData_PolylineXY)& thePolyline )
 {
   SetReferenceObject( thePolyline, DataTag_Polyline );
+  SetToUpdate( true );
 }
 
 Handle(HYDROData_PolylineXY) HYDROData_ImmersibleZone::GetPolyline() const
@@ -187,6 +201,7 @@ Handle(HYDROData_PolylineXY) HYDROData_ImmersibleZone::GetPolyline() const
 void HYDROData_ImmersibleZone::RemovePolyline()
 {
   ClearReferenceObjects( DataTag_Polyline );
+  SetToUpdate( true );
 }
 
 
index f7111a37960632d1aaa5c48fd07e4a20a275a1d6..d8ea781c33d761aba6394d19dc58660ac9754eae 100644 (file)
@@ -42,6 +42,12 @@ public:
    */
   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
 
+  /**
+   * Update the immersible zone object.
+   * Call this method whenever you made changes for object data.
+   */
+  HYDRODATA_EXPORT virtual void Update();
+
   /**
    * Returns the top shape of the object.
    */
@@ -77,6 +83,10 @@ public:
    */
   HYDRODATA_EXPORT virtual void RemovePolyline();
 
+private:
+
+  TopoDS_Shape generateTopShape() const;
+
 protected:
 
   friend class HYDROData_Iterator;
index e8477db6e038bdba58fe79b27ce1f76fb496d972..3efd5c7bfad7bfc46a5248376ba31af5d0ff340d 100644 (file)
@@ -47,14 +47,15 @@ void HYDROData_Object::SetShape3D( const TopoDS_Shape& theShape )
 
 void HYDROData_Object::Update()
 {
+  HYDROData_Entity::Update();
   removeTopShape();
   removeShape3D();
-  SetToUpdate( false );
 }
 
 void HYDROData_Object::SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
 {
   SetReferenceObject( theBathymetry, DataTag_Bathymetry );
+  SetToUpdate( true );
 }
 
 Handle(HYDROData_Bathymetry) HYDROData_Object::GetBathymetry() const
@@ -66,6 +67,7 @@ Handle(HYDROData_Bathymetry) HYDROData_Object::GetBathymetry() const
 void HYDROData_Object::RemoveBathymetry()
 {
   ClearReferenceObjects( DataTag_Bathymetry );
+  SetToUpdate( true );
 }
 
 TopoDS_Shape HYDROData_Object::getTopShape() const
@@ -110,7 +112,7 @@ void HYDROData_Object::removeShape3D()
 
 void HYDROData_Object::SetFillingColor( const QColor& theColor )
 {
-  return SetColor( theColor, DataTag_FillingColor );
+  SetColor( theColor, DataTag_FillingColor );
 }
 
 QColor HYDROData_Object::GetFillingColor() const
@@ -120,7 +122,7 @@ QColor HYDROData_Object::GetFillingColor() const
 
 void HYDROData_Object::SetBorderColor( const QColor& theColor )
 {
-  return SetColor( theColor, DataTag_BorderColor );
+  SetColor( theColor, DataTag_BorderColor );
 }
 
 QColor HYDROData_Object::GetBorderColor() const
index b20f1bd8717e1fce598ba5a731723a7ba67f1342..a8cb4c0f7c3e837ac5e3e2f5eeed23579e76f7d7 100755 (executable)
@@ -190,6 +190,8 @@ void HYDROData_PolylineXY::BuildPainterPath( QPainterPath&
 
 void HYDROData_PolylineXY::Update()
 {
+  HYDROData_IPolyline::Update();
+
   NCollection_Sequence<TCollection_AsciiString>           aSectNames;
   NCollection_Sequence<HYDROData_PolylineXY::SectionType> aSectTypes;
   NCollection_Sequence<bool>                              aSectClosures;
@@ -379,6 +381,8 @@ void HYDROData_PolylineXY::AddSection( const TCollection_AsciiString& theSectNam
   aNamesList->Append( aSectName );
   aTypesList->Append( theSectionType );
   aClosuresList->Append( theIsClosed );
+
+  SetToUpdate( true );
 }
 
 TCollection_AsciiString HYDROData_PolylineXY::GetSectionName( const int theSectionIndex ) const
@@ -422,6 +426,8 @@ void HYDROData_PolylineXY::SetSectionName( const int                      theSec
   TDataStd_ListIteratorOfListOfExtendedString aNamesIter( anOldNamesList );
   for ( int i = 0; aNamesIter.More(); aNamesIter.Next(), ++i )
     aNamesList->Append( i == theSectionIndex ? aNewSectName : aNamesIter.Value() );
+
+  SetToUpdate( true );
 }
 
 HYDROData_PolylineXY::SectionType HYDROData_PolylineXY::GetSectionType( const int theSectionIndex ) const
@@ -458,6 +464,8 @@ void HYDROData_PolylineXY::SetSectionType( const int         theSectionIndex,
   TColStd_ListIteratorOfListOfInteger aTypesIter( anOldTypesList );
   for ( int i = 0; aTypesIter.More(); aTypesIter.Next(), ++i )
     aTypesList->Append( i == theSectionIndex ? theSectionType : aTypesIter.Value() );
+
+  SetToUpdate( true );
 }
 
 bool HYDROData_PolylineXY::IsClosedSection( const int theSectionIndex ) const
@@ -494,6 +502,8 @@ void HYDROData_PolylineXY::SetSectionClosed( const int  theSectionIndex,
   TDataStd_ListIteratorOfListOfByte aClosuresIter( anOldClosuresList );
   for ( int i = 0; aClosuresIter.More(); aClosuresIter.Next(), ++i )
     aClosuresList->Append( i == theSectionIndex ? theIsClosed : (bool)aClosuresIter.Value() );
+
+  SetToUpdate( true );
 }
 
 void HYDROData_PolylineXY::GetSections( NCollection_Sequence<TCollection_AsciiString>& theSectNames,
@@ -574,12 +584,15 @@ void HYDROData_PolylineXY::RemoveSection( const int theSectionIndex )
     // Remove points that belongs to removed section
     removePointsLists( theSectionIndex );
   }
+
+  SetToUpdate( true );
 }
 
 void HYDROData_PolylineXY::RemoveSections()
 {
   removeSectionsLists();
   removePointsLists();
+  SetToUpdate( true );
 }
 
 void HYDROData_PolylineXY::AddPoint( const int    theSectionIndex,
@@ -624,6 +637,8 @@ void HYDROData_PolylineXY::AddPoint( const int    theSectionIndex,
       aListY->Append( aCoordY );
     }
   }
+
+  SetToUpdate( true );
 }
 
 void HYDROData_PolylineXY::SetPoint( const int    theSectionIndex,
@@ -673,6 +688,8 @@ void HYDROData_PolylineXY::SetPoint( const int    theSectionIndex,
       aListY->Append( aCoordY );
     }
   }
+
+  SetToUpdate( true );
 }
 
 void HYDROData_PolylineXY::RemovePoint( const int theSectionIndex,
@@ -710,6 +727,8 @@ void HYDROData_PolylineXY::RemovePoint( const int theSectionIndex,
       aListY->Append( anIterY.Value() );
     }
   }
+
+  SetToUpdate( true );
 }
 
 HYDROData_PolylineXY::PointsList HYDROData_PolylineXY::GetPoints( const int theSectionIndex ) const
index b32809b3d53da99396d8274ba5e90911659cbbfa..85f5fd72f07ae74bf124245c180134735e364f2b 100755 (executable)
@@ -64,6 +64,8 @@ TopoDS_Shape HYDROData_Profile::GetShape3D() const
 
 void HYDROData_Profile::Update()
 {
+  HYDROData_Object::Update();
+
   BRepBuilderAPI_MakeWire aMakeWire;
 
   ProfilePoints aProfilePoints = GetProfilePoints();
@@ -129,6 +131,8 @@ void HYDROData_Profile::SetFirstPoint( const gp_XY& thePoint )
 
   anArray->SetValue( 0, thePoint.X() );
   anArray->SetValue( 1, thePoint.Y() );
+
+  SetToUpdate( true );
 }
 
 bool HYDROData_Profile::GetFirstPoint( gp_XY& thePoint ) const
@@ -157,6 +161,8 @@ void HYDROData_Profile::SetLastPoint( const gp_XY& thePoint )
 
   anArray->SetValue( 0, thePoint.X() );
   anArray->SetValue( 1, thePoint.Y() );
+
+  SetToUpdate( true );
 }
 
 bool HYDROData_Profile::GetLastPoint( gp_XY& thePoint ) const
@@ -184,6 +190,8 @@ void HYDROData_Profile::Invalidate()
   TDF_Label aLastLabel = myLab.FindChild( DataTag_LastPoint, false );
   if ( !aLastLabel.IsNull() )
     aLastLabel.ForgetAllAttributes();
+
+  SetToUpdate( true );
 }
 
 Handle(HYDROData_ProfileUZ) HYDROData_Profile::GetProfileUZ( const bool theIsCreate ) const
@@ -214,7 +222,10 @@ void HYDROData_Profile::RemovePoints()
 {
   Handle(HYDROData_ProfileUZ) aProfileUZ = GetProfileUZ( false );
   if ( !aProfileUZ.IsNull() )
+  {
     aProfileUZ->RemoveSections();
+    SetToUpdate( true );
+  }
 }
 
 void HYDROData_Profile::SetParametricPoints( const HYDROData_ProfileUZ::PointsList& thePoints )
@@ -227,6 +238,8 @@ void HYDROData_Profile::SetParametricPoints( const HYDROData_ProfileUZ::PointsLi
     const HYDROData_ProfileUZ::Point& aPoint = thePoints.Value( i );
     aProfileUZ->AddPoint( 0, aPoint );
   }
+
+  SetToUpdate( true );
 }
 
 HYDROData_ProfileUZ::PointsList HYDROData_Profile::GetParametricPoints() const
index fee6e1105dc018dac99aff70dd9077297291c9bb..68e759d729dc1ba2c6bf485ed9d56df19aa64885 100644 (file)
@@ -25,42 +25,33 @@ void HYDROData_Tool::WriteStringsToFile( QFile&             theFile,
   anOutStream << aWriteStr << theSep << theSep;
 }
 
-void HYDROData_Tool::SetMustBeUpdatedImages(
+void HYDROData_Tool::SetMustBeUpdatedObjects(
   const Handle(HYDROData_Document)& theDoc  )
 {
   bool anIsChanged = true;
 
-  // iterate until there is no changes because images on all level of dependency must be updated
+  // iterate until there is no changes because objects on all level of dependency must be updated
   while ( anIsChanged )
   {
     anIsChanged = false;
 
-    HYDROData_Iterator anIter( theDoc, KIND_IMAGE );
+    HYDROData_Iterator anIter( theDoc );
     for ( ; anIter.More(); anIter.Next() )
     {
-      Handle(HYDROData_Image) anImage = 
-        Handle(HYDROData_Image)::DownCast( anIter.Current() );
-      if ( anImage.IsNull() || anImage->IsMustBeUpdated() )
+      Handle(HYDROData_Entity) anObject = anIter.Current();
+      if ( anObject.IsNull() || anObject->IsMustBeUpdated() )
         continue;
 
-      Handle(HYDROData_Image) aTrsfRefImage = anImage->GetTrsfReferenceImage();
-      if ( !aTrsfRefImage.IsNull() && aTrsfRefImage->IsMustBeUpdated() )
+      HYDROData_SequenceOfObjects aRefSeq = anObject->GetAllReferenceObjects();
+      for ( int i = 1, n = aRefSeq.Length(); i <= n; ++i )
       {
-        anImage->SetToUpdate( true );
-        anIsChanged = true;
-        continue;
-      }
+        Handle(HYDROData_Entity) aRefObject = aRefSeq.Value( i );
+        if ( aRefObject.IsNull() || !aRefObject->IsMustBeUpdated() )
+          continue;
 
-      for ( int i = 0, aNBRefs = anImage->NbReferences(); i < aNBRefs; ++i )
-      {
-        Handle(HYDROData_Image) aRefImage =
-          Handle(HYDROData_Image)::DownCast( anImage->Reference( i ) );
-        if ( !aRefImage.IsNull() && aRefImage->IsMustBeUpdated() )
-        {
-           // image references to updated => also must be updated
-           anImage->SetToUpdate( true );
-           anIsChanged = true;
-        }
+        anObject->SetToUpdate( true );
+        anIsChanged = true;
+        break;
       }
     }
   }
index a1fc83373496e5a1a6d8424d86bb7792769ac627..cb1506e05a9a280a6c4bb6de5981a3b54439d57e 100644 (file)
@@ -22,10 +22,10 @@ public:
                                                             const QString&     theSep = "\n" );
 
   /**
-   * Enables "MustBeUpdated" flag for Images that are depended on "MustBeUpdated" images.
+   * Enables "MustBeUpdated" flag for objects that are depended on "MustBeUpdated" objects.
    * \param theDoc document where this operation is performed
    */
-  static void                           SetMustBeUpdatedImages( const Handle(HYDROData_Document)& theDoc );
+  static void                           SetMustBeUpdatedObjects( const Handle(HYDROData_Document)& theDoc );
 
   /**
    * \brief Generate name for new object.
index a7f6b51658938f9a7a8d0937c63f62fbeaababc3..2ac374ba62369db3069b0fb11eb99a84e899cf42 100644 (file)
@@ -57,7 +57,7 @@ set(PROJECT_HEADERS
     HYDROGUI_TwoImagesDlg.h
     HYDROGUI_TwoImagesOp.h
     HYDROGUI_UpdateFlags.h
-    HYDROGUI_UpdateImageOp.h
+    HYDROGUI_UpdateObjectOp.h
     HYDROGUI_VisualStateOp.h
     HYDROGUI_VTKPrs.h
     HYDROGUI_VTKPrsBathymetry.h
@@ -133,7 +133,7 @@ set(PROJECT_SOURCES
     HYDROGUI_Tool.cxx
     HYDROGUI_TwoImagesDlg.cxx
     HYDROGUI_TwoImagesOp.cxx
-    HYDROGUI_UpdateImageOp.cxx
+    HYDROGUI_UpdateObjectOp.cxx
     HYDROGUI_VisualStateOp.cxx
     HYDROGUI_VTKPrs.cxx
     HYDROGUI_VTKPrsBathymetry.cxx
index 0323f921935798dd965d6ccf5802fc2a2356ab98..ad69b40c86fe7ae1690bb09178491878e8bc245a 100644 (file)
@@ -556,7 +556,7 @@ void HYDROGUI_CalculationOp::onSplitZones()
   if ( myEditedObject->IsMustBeUpdated() )
   {
     myShowZones = true;
-    myEditedObject->SplitGeometryObjects();
+    myEditedObject->Update();
 
     aPanel->setEditedObject( myEditedObject );
 
index 92bcc38c6c0ee49734688ed2090f30e47f79f38e..3e9fd482bbee6b2f055c3c4c33e747f5825c59ed 100644 (file)
@@ -221,6 +221,7 @@ bool HYDROGUI_ImmersibleZoneOp::processApply( int& theUpdateFlags,
 
   aZoneObj->SetPolyline( aZonePolyline );
   aZoneObj->SetBathymetry( aZoneBathymetry );
+  aZoneObj->Update();
 
   closePreview();
 
index 3c3f64f039ec95f2655f277296b8c6ef2d523a1c..b3232d5f191a7427ec888c16deb7409316900466 100644 (file)
@@ -466,8 +466,7 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
   if( !myIsEdit )
     module()->setObjectVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), anImageObj, true );
 
-  if( myIsEdit )
-    anImageObj->Update();
+  anImageObj->Update();
 
   theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced;
   return true;
index 3433e99aec960b32d6376441fc60762b015dd008..19d2e20757c0f91b3f4d75e5eb7b0e5a6a8f72c9 100644 (file)
@@ -253,7 +253,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
   bool anIsFusedImage = false;
   bool anIsCutImage = false;
   bool anIsSplittedImage = false;
-  bool anIsMustBeUpdatedImage = false;
+  bool anIsMustobjectBeUpdated = false;
   bool anIsPolyline = false;
   bool anIsPolyline3D = false;
   bool anIsProfile = false;
@@ -290,6 +290,11 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       anIsVisibleInSelection |= aVisibility;
       anIsHiddenInSelection |= !aVisibility;
 
+      if ( anObject->IsMustBeUpdated() )
+      {
+        anIsMustobjectBeUpdated = true;
+      }
+
       ObjectKind anObjectKind = anObject->GetKind();
       if( anObjectKind == KIND_IMAGE )
       {
@@ -312,10 +317,6 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
                 anIsSplittedImage = true;
             }
           }
-          if ( anImage->IsMustBeUpdated() )
-          {
-            anIsMustBeUpdatedImage = true;
-          }
         }
       }
       else if( anObjectKind == KIND_POLYLINEXY )
@@ -410,9 +411,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
 
   if( anIsSelectedDataObjects )
   {
-    if ( anIsMustBeUpdatedImage )
+    if ( anIsMustobjectBeUpdated )
     {
-      theMenu->addAction( action( UpdateImageId ) );
+      theMenu->addAction( action( UpdateObjectId ) );
       theMenu->addSeparator();
     }
 
index 96f78286d9da998e396e6abcac89ae8ceb50e9de..85601129dadd793f7522178b8d52a669f80a73b8 100644 (file)
@@ -41,7 +41,7 @@
 #include "HYDROGUI_StreamOp.h"
 #include "HYDROGUI_TwoImagesOp.h"
 #include "HYDROGUI_UpdateFlags.h"
-#include "HYDROGUI_UpdateImageOp.h"
+#include "HYDROGUI_UpdateObjectOp.h"
 #include "HYDROGUI_VisualStateOp.h"
 #include "HYDROGUI_ImmersibleZoneOp.h"
 #include "HYDROGUI_ImportGeomObjectOp.h"
@@ -102,11 +102,12 @@ void HYDROGUI_Module::createActions()
   createAction( CopyId, "COPY", "", Qt::CTRL + Qt::Key_C );
   createAction( PasteId, "PASTE", "", Qt::CTRL + Qt::Key_V );
 
+  createAction( UpdateObjectId, "UPDATE_OBJECT" );
+
   createAction( ImportImageId, "IMPORT_IMAGE", "", Qt::CTRL + Qt::Key_I );
   createAction( EditImportedImageId, "EDIT_IMPORTED_IMAGE" );
   createAction( ObserveImageId, "OBSERVE_IMAGE" );
   createAction( ExportImageId, "EXPORT_IMAGE" );
-  createAction( UpdateImageId, "UPDATE_IMAGE" );
   createAction( RemoveImageRefsId, "REMOVE_IMAGE_REFERENCE" );
 
   createAction( CreatePolylineId, "CREATE_POLYLINE" );
@@ -347,8 +348,8 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case ExportImageId:
     anOp = new HYDROGUI_ExportImageOp( aModule );
     break;
-  case UpdateImageId:
-    anOp = new HYDROGUI_UpdateImageOp( aModule );
+  case UpdateObjectId:
+    anOp = new HYDROGUI_UpdateObjectOp( aModule );
     break;
   case RemoveImageRefsId:
     anOp = new HYDROGUI_RemoveImageRefsOp( aModule );
index d892d67f518dcddace385121c84c389b36b0f336..3344f3c9ec391e01d33584b35d028e3fc97897f1 100644 (file)
@@ -36,11 +36,12 @@ enum OperationId
   CopyId,
   PasteId,
 
+  UpdateObjectId,
+
   ImportImageId,
   EditImportedImageId,
   ObserveImageId,
   ExportImageId,
-  UpdateImageId,
   RemoveImageRefsId,
 
   CreatePolylineId,
index 386e914ae9a46b8cb946734a612314db0e9e9ad1..a9a9cf2cdeb0a2280f2744e85ed1fe1c3ad9af33 100644 (file)
@@ -200,6 +200,8 @@ bool HYDROGUI_ProfileOp::processApply( int& theUpdateFlags,
   }
   aProfileObj->SetParametricPoints( aProfileParamPoints );
 
+  aProfileObj->Update();
+
   theUpdateFlags = UF_Model;
   return true;
 }
diff --git a/src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx b/src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx
deleted file mode 100644 (file)
index 3425618..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "HYDROGUI_UpdateImageOp.h"
-
-#include "HYDROGUI_Module.h"
-#include "HYDROGUI_Tool.h"
-#include "HYDROGUI_UpdateFlags.h"
-
-#include <HYDROData_Document.h>
-#include <HYDROData_Image.h>
-
-HYDROGUI_UpdateImageOp::HYDROGUI_UpdateImageOp( HYDROGUI_Module* theModule )
-: HYDROGUI_Operation( theModule )
-{
-  setName( tr( "UPDATE_IMAGE" ) );
-}
-
-HYDROGUI_UpdateImageOp::~HYDROGUI_UpdateImageOp()
-{
-}
-
-void HYDROGUI_UpdateImageOp::startOperation()
-{
-  HYDROGUI_Operation::startOperation();
-
-  startDocOperation();
-
-  HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() );
-  for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
-  {
-    Handle(HYDROData_Image) anImage =
-      Handle(HYDROData_Image)::DownCast( aSeq.Value( anIndex ) );
-    if( !anImage.IsNull() && anImage->IsMustBeUpdated() )
-      anImage->Update();
-  }
-
-  commitDocOperation();
-
-  module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced );
-  commit();
-}
diff --git a/src/HYDROGUI/HYDROGUI_UpdateImageOp.h b/src/HYDROGUI/HYDROGUI_UpdateImageOp.h
deleted file mode 100644 (file)
index fa01143..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef HYDROGUI_UPDATEIMAGEOP_H
-#define HYDROGUI_UPDATEIMAGEOP_H
-
-#include "HYDROGUI_Operation.h"
-
-class HYDROGUI_UpdateImageOp : public HYDROGUI_Operation
-{
-  Q_OBJECT
-
-public:
-  HYDROGUI_UpdateImageOp( HYDROGUI_Module* theModule );
-  virtual ~HYDROGUI_UpdateImageOp();
-
-protected:
-  virtual void               startOperation();
-};
-
-#endif
diff --git a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx
new file mode 100644 (file)
index 0000000..ec2285e
--- /dev/null
@@ -0,0 +1,83 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HYDROGUI_UpdateObjectOp.h"
+
+#include "HYDROGUI_Module.h"
+#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_UpdateFlags.h"
+
+#include <HYDROData_Document.h>
+#include <HYDROData_Image.h>
+
+HYDROGUI_UpdateObjectOp::HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule )
+{
+  setName( tr( "UPDATE_IMAGE" ) );
+}
+
+HYDROGUI_UpdateObjectOp::~HYDROGUI_UpdateObjectOp()
+{
+}
+
+void HYDROGUI_UpdateObjectOp::startOperation()
+{
+  HYDROGUI_Operation::startOperation();
+
+  startDocOperation();
+
+  NCollection_Map<Handle(HYDROData_Entity)> aMapOfTreated;
+
+  HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() );
+  for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
+  {
+    Handle(HYDROData_Entity) anObject = aSeq.Value( anIndex );
+    updateObject( anObject, aMapOfTreated );
+  }
+
+  commitDocOperation();
+
+  module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced );
+  commit();
+}
+
+void HYDROGUI_UpdateObjectOp::updateObject( const Handle(HYDROData_Entity)& theObject,
+                                           NCollection_Map<Handle(HYDROData_Entity)>& theMapOfTreated ) const
+{
+  if( theObject.IsNull() || theMapOfTreated.Contains( theObject ) )
+    return;
+
+  theMapOfTreated.Add( theObject );
+
+  HYDROData_SequenceOfObjects aRefSeq = theObject->GetAllReferenceObjects();
+  for ( int i = 1, n = aRefSeq.Length(); i <= n; ++i )
+  {
+    Handle(HYDROData_Entity) anObject = aRefSeq.Value( i );
+    updateObject( anObject, theMapOfTreated );
+  }
+
+  if ( !theObject->IsMustBeUpdated() )
+    return;
+
+  theObject->Update();
+}
+
diff --git a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h
new file mode 100644 (file)
index 0000000..735b01b
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROGUI_UpdateObjectOp_H
+#define HYDROGUI_UpdateObjectOp_H
+
+#include "HYDROGUI_Operation.h"
+
+#include <NCollection_Map.hxx>
+
+class Handle_HYDROData_Entity;
+
+class HYDROGUI_UpdateObjectOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule );
+  virtual ~HYDROGUI_UpdateObjectOp();
+
+protected:
+
+  virtual void               startOperation();
+
+  virtual void               updateObject( const Handle_HYDROData_Entity& theObject,
+                                           NCollection_Map<Handle(HYDROData_Entity)>& theMapOfTreated  ) const;
+};
+
+#endif
index 4fece1fa9f7906072ad2befb0fce6427fbd5bbc1..751d79b516ccdd7d95c1aa6d0966b4be49dc74d4 100644 (file)
@@ -657,8 +657,8 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <translation>Undo</translation>
     </message>
     <message>
-      <source>DSK_UPDATE_IMAGE</source>
-      <translation>Update image</translation>
+      <source>DSK_UPDATE_OBJECT</source>
+      <translation>Update</translation>
     </message>
     <message>
       <source>DSK_IMPORT_OBSTACLE_FROM_FILE</source>
@@ -869,8 +869,8 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <translation>Undo</translation>
     </message>
     <message>
-      <source>MEN_UPDATE_IMAGE</source>
-      <translation>Update image</translation>
+      <source>MEN_UPDATE_OBJECT</source>
+      <translation>Update</translation>
     </message>
     <message>
       <source>MEN_IMPORT_OBSTACLE_FROM_FILE</source>
@@ -1057,8 +1057,8 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <translation>Undo</translation>
     </message>
     <message>
-      <source>STB_UPDATE_IMAGE</source>
-      <translation>Update image</translation>
+      <source>STB_UPDATE_OBJECT</source>
+      <translation>Update</translation>
     </message>
     <message>
       <source>STB_IMPORT_OBSTACLE_FROM_FILE</source>