mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 22:40:33 +05:00
PAL13330( When mesh generation does not success, trace where )
check if ViewWindow is not deleted along with a study
This commit is contained in:
parent
3950e041fa
commit
7ddeb6ccec
@ -44,6 +44,7 @@
|
|||||||
#include "SALOMEDSClient_SObject.hxx"
|
#include "SALOMEDSClient_SObject.hxx"
|
||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
#include "SVTK_ViewWindow.h"
|
#include "SVTK_ViewWindow.h"
|
||||||
|
#include "SVTK_ViewModel.h"
|
||||||
#include "SalomeApp_Tools.h"
|
#include "SalomeApp_Tools.h"
|
||||||
#include "SalomeApp_Application.h"
|
#include "SalomeApp_Application.h"
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include "SUIT_ResourceMgr.h"
|
||||||
@ -124,12 +125,14 @@ namespace SMESH {
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
void DeleteActors()
|
void DeleteActors()
|
||||||
{
|
{
|
||||||
TActorIterator actorIt = actorIterator();
|
if ( hasViewWindow() ) {
|
||||||
while ( actorIt.more() )
|
TActorIterator actorIt = actorIterator();
|
||||||
if (VTKViewer_Actor* anActor = actorIt.next()) {
|
while ( actorIt.more() )
|
||||||
myViewWindow->RemoveActor( anActor );
|
if (VTKViewer_Actor* anActor = actorIt.next()) {
|
||||||
//anActor->Delete();
|
myViewWindow->RemoveActor( anActor );
|
||||||
}
|
//anActor->Delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
myIndexToShape.Clear();
|
myIndexToShape.Clear();
|
||||||
myActors.clear();
|
myActors.clear();
|
||||||
myShownActors.clear();
|
myShownActors.clear();
|
||||||
@ -271,6 +274,16 @@ namespace SMESH {
|
|||||||
double deflection = Max( aXmax-aXmin , Max ( aYmax-aYmin , aZmax-aZmin)) * 0.01 *4;
|
double deflection = Max( aXmax-aXmin , Max ( aYmax-aYmin , aZmax-aZmin)) * 0.01 *4;
|
||||||
BRepMesh_IncrementalMesh MESH(shape,deflection);
|
BRepMesh_IncrementalMesh MESH(shape,deflection);
|
||||||
}
|
}
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
bool hasViewWindow() const
|
||||||
|
{
|
||||||
|
if ( !myViewWindow ) return false;
|
||||||
|
|
||||||
|
if ( SalomeApp_Application* anApp = SMESHGUI::GetSMESHGUI()->getApp() )
|
||||||
|
return FindVtkViewWindow( anApp->getViewManager(SVTK_Viewer::Type(), false ),
|
||||||
|
myViewWindow );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// =========================================================================================
|
// =========================================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user