From 441d80aa0206954cf5369eb99ecb394a5a7808b8 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 6 Oct 2014 21:48:58 +0000 Subject: [PATCH] merge BR_hydro_v1_0_3 on BR_quadtree --- src/HYDROData/HYDROData_Document.cxx | 2 ++ src/HYDROData/HYDROData_SplitToZonesTool.cxx | 32 +++++++++-------- src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx | 37 ++++++++++++++++++++ src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h | 5 +++ 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index 86d16b08..5f95e02b 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -205,6 +205,8 @@ bool HYDROData_Document::DumpToPython( const QString& theFileName, // Dump the local CS data to Python UpdateLCSFields(); QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY ); + if( theIsMultiFile ) + aLCS.prepend( " " ); HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS ); // Dump all model objects to Python script diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.cxx b/src/HYDROData/HYDROData_SplitToZonesTool.cxx index 16062cf5..fabf15d9 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.cxx +++ b/src/HYDROData/HYDROData_SplitToZonesTool.cxx @@ -266,13 +266,15 @@ HYDROData_SplitToZonesTool::SplitDataList TopTools_ListIteratorOfListOfShape it(aListOfNew); for(;it.More();it.Next()) aList.Append(it.Value()); + /* ********************************************************************* // Bug in History: partition should give only modified entities! => temporary solution is used - const TopTools_ListOfShape& aListOfGen = splitTool.Generated(anIt.Value()); - if(!aListOfGen.IsEmpty()) - foundF = Standard_True; - it.Initialize(aListOfGen); - for(;it.More();it.Next()) - aList.Append(it.Value()); + //const TopTools_ListOfShape& aListOfGen = splitTool.Generated(anIt.Value()); + //if(!aListOfGen.IsEmpty()) + //foundF = Standard_True; + //it.Initialize(aListOfGen); + //for(;it.More();it.Next()) + // aList.Append(it.Value()); + ********************************************************************* */ if(!foundF) // face is not modified aList.Append (anIt.Value()); aDM1.Bind(anIt.Value(), aList); @@ -295,12 +297,14 @@ HYDROData_SplitToZonesTool::SplitDataList //BRepTools::Write(it.Value(),aName.ToCString()); #endif } - const TopTools_ListOfShape& aListG = splitTool.Generated(exp.Current()); - if(aListG.Extent()) foundE = Standard_True; - it.Initialize(aListG); - for(int k=1;it.More();it.Next(),k++) - aList.Append(it.Value()); + /* ********************************************************************* + //const TopTools_ListOfShape& aListG = splitTool.Generated(exp.Current()); + //if(aListG.Extent()) foundE = Standard_True; + //it.Initialize(aListG); + //for(int k=1;it.More();it.Next(),k++) + //aList.Append(it.Value()); //cout << "NB_EDGE = " << aList.Extent() <getVTKViewer( theViewerId ); + if( aViewer ) + { + SALOME_ListIO aListIO; + aViewer->GetVisible( aListIO ); + + HYDROGUI_VTKPrs* aPrs; + SALOME_ListIteratorOfListIO anIter( aListIO ); + for( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_InteractiveObject) aPrsObj = anIter.Value(); + if ( !aPrsObj.IsNull() ) + { + Handle(HYDROData_Entity) anObj = + module()->getDataModel()->objectByEntry( aPrsObj->getEntry() ); + aPrs = module()->getObjectVTKPrs( (size_t)aViewer, anObj ); + if( aPrs->needScalarBar() ) + { + isEraseScalarBar = false; + break; + } + } + } + } + + if( isEraseScalarBar ) + EraseScalarBar( theViewerId ); +} + void HYDROGUI_VTKPrsDisplayer::EraseAll( const int theViewerId ) { SVTK_Viewer* aViewer = module()->getVTKViewer( theViewerId ); diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h index 66e2f751..def7b8a4 100644 --- a/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h +++ b/src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h @@ -78,6 +78,11 @@ public: void EraseScalarBar( const int theViewerId, const bool theIsDelete = false ); protected: + + virtual void DisplayAll( const int theViewerId, + const bool theIsForced, + const bool theDoFitAll ); + /** * \brief Erase all viewer objects. * \param theViewerId viewer identifier -- 2.30.2