X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_VTKUtils.cxx;h=61d21573a79e382c4b4cc6cd8cf12e7e35b918f7;hp=d19fa7d1f9062f96486ed95b2ab9ac07c3f9886b;hb=8c1dfe2d90664a70f4451f77af48c1cde5638b60;hpb=ea70fb08091e0a2ea837d77cd4785c07eba5a823 diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index d19fa7d1f..61d21573a 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -252,7 +252,7 @@ namespace SMESH */ //================================================================================ - TVisualObjPtr GetVisualObj(int theStudyId, const char* theEntry){ + TVisualObjPtr GetVisualObj(int theStudyId, const char* theEntry, bool nulData){ TVisualObjPtr aVisualObj; TVisualObjCont::key_type aKey(theStudyId,theEntry); try{ @@ -326,7 +326,11 @@ namespace SMESH #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; #endif - objModified = aVisualObj->Update(); + MESSAGE("GetVisualObj"); + if (nulData) + objModified = aVisualObj->NulData(); + else + objModified = aVisualObj->Update(); } catch (...) { #ifdef _DEBUG_ @@ -599,6 +603,7 @@ namespace SMESH } } } + MESSAGE("CreateActor " << anActor); return anActor; } @@ -609,6 +614,7 @@ namespace SMESH #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; #endif + MESSAGE("DisplayActor " << theActor); vtkWnd->AddActor(theActor); vtkWnd->Repaint(); } @@ -624,6 +630,7 @@ namespace SMESH void RemoveActor( SUIT_ViewWindow *theWnd, SMESH_Actor* theActor){ if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(theWnd)){ + MESSAGE("RemoveActor " << theActor); vtkWnd->RemoveActor(theActor); if(theActor->hasIO()){ Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); @@ -662,6 +669,7 @@ namespace SMESH bool UpdateView(SUIT_ViewWindow *theWnd, EDisplaing theAction, const char* theEntry) { + MESSAGE("UpdateView"); bool OK = false; SVTK_ViewWindow* aViewWnd = GetVtkViewWindow(theWnd); if (!aViewWnd) @@ -678,6 +686,7 @@ namespace SMESH case eDisplayAll: { while (vtkActor *anAct = aCollection->GetNextActor()) { if (SMESH_Actor *anActor = dynamic_cast(anAct)) { + MESSAGE("--- display " << anActor); anActor->SetVisibility(true); } } @@ -685,8 +694,10 @@ namespace SMESH } case eDisplayOnly: case eEraseAll: { + MESSAGE("---case eDisplayOnly"); while (vtkActor *anAct = aCollection->GetNextActor()) { if (SMESH_Actor *anActor = dynamic_cast(anAct)) { + MESSAGE("--- erase " << anActor); anActor->SetVisibility(false); } } @@ -696,10 +707,12 @@ namespace SMESH switch (theAction) { case eDisplay: case eDisplayOnly: + MESSAGE("--- display " << anActor); anActor->SetVisibility(true); if (theAction == eDisplayOnly) aRenderer->ResetCameraClippingRange(); break; case eErase: + MESSAGE("--- erase " << anActor); anActor->SetVisibility(false); break; } @@ -708,6 +721,7 @@ namespace SMESH case eDisplay: case eDisplayOnly: { + MESSAGE("---"); SalomeApp_Study* aStudy = dynamic_cast(theWnd->getViewManager()->study()); _PTR(Study) aDocument = aStudy->studyDS(); // Pass non-visual objects (hypotheses, etc.), return true in this case @@ -736,6 +750,7 @@ namespace SMESH bool UpdateView(EDisplaing theAction, const char* theEntry){ + MESSAGE("UpdateView"); SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( GetActiveStudy() ); SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( aStudy->application() ); SUIT_ViewWindow *aWnd = app->activeViewManager()->getActiveView(); @@ -774,6 +789,7 @@ namespace SMESH bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) { + MESSAGE("Update"); _PTR(Study) aStudy = GetActiveStudyDocument(); CORBA::Long anId = aStudy->StudyId(); if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) { @@ -784,6 +800,18 @@ namespace SMESH return false; } + bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) + { + MESSAGE("UpdateNulData"); + _PTR(Study) aStudy = GetActiveStudyDocument(); + CORBA::Long anId = aStudy->StudyId(); + if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) { + if ( theDisplay ) + UpdateView(SMESH::eDisplay,theIO->getEntry()); + return true; + } + return false; + } void UpdateSelectionProp( SMESHGUI* theModule ) { if( !theModule )