mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-26 14:20:34 +05:00
Fix crash after 'Belong to' filter creation if there are no mesh in the study
This commit is contained in:
parent
694e1d2360
commit
8ad9cef463
@ -805,8 +805,8 @@ SalomeApp_Module( "SMESH" )
|
||||
myComponentSMESH = SMESH::SMESH_Gen::_narrow( comp );
|
||||
}
|
||||
|
||||
myActiveDialogBox = 0 ;
|
||||
myState = -1 ;
|
||||
myActiveDialogBox = 0;
|
||||
myState = -1;
|
||||
myDisplayer = 0;
|
||||
|
||||
SMESH::GetFilterManager();
|
||||
@ -1059,6 +1059,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
||||
if( !mgr )
|
||||
return false;
|
||||
|
||||
if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) {
|
||||
GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
|
||||
}
|
||||
|
||||
SUIT_ViewWindow* view = application()->desktop()->activeWindow();
|
||||
SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
|
||||
|
||||
@ -2754,8 +2758,8 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
QString anActiveVTK = QString("activeView = '%1'").arg(VTKViewer_Viewer::Type());
|
||||
QString aSelCount = QString( "%1 > 0" ).arg( QtxPopupMgr::Selection::defSelCountParam() );
|
||||
|
||||
QString aRule = "$component={'SMESH'} and ( type='Component' or (" + aClient + " and " + aType + " and " + aSelCount +
|
||||
" and " + anActiveVTK + " and " + isNotEmpty + " %1 ) )";
|
||||
QString aRule = "$component={'SMESH'} and ( type='Component' or (" + aClient + " and " +
|
||||
aType + " and " + aSelCount + " and " + anActiveVTK + " and " + isNotEmpty + " %1 ) )";
|
||||
popupMgr()->insert( action( 301 ), -1, -1 ); // DISPLAY
|
||||
popupMgr()->setRule( action( 301 ), aRule.arg( "and (not isVisible)" ), true);
|
||||
|
||||
|
@ -376,7 +376,7 @@ static TopoDS_Shape getShapeByName( const char* theName )
|
||||
{
|
||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
||||
if ( aStudy != 0 )
|
||||
if (!CORBA::is_nil(aStudy))
|
||||
{
|
||||
SALOMEDS::Study::ListOfSObject_var aList =
|
||||
aStudy->FindObjectByName( theName, "GEOM" );
|
||||
@ -614,7 +614,6 @@ SMESH::Length2D::Values* Length2D_i::GetValues()
|
||||
aValue.myLength = aVal.myLength;
|
||||
aValue.myPnt1 = aVal.myPntId[ 0 ];
|
||||
aValue.myPnt2 = aVal.myPntId[ 1 ];
|
||||
|
||||
}
|
||||
|
||||
INFOS("Length2D_i::GetValuess~");
|
||||
@ -670,7 +669,6 @@ SMESH::MultiConnection2D::Values* MultiConnection2D_i::GetValues()
|
||||
aValue.myPnt1 = aVal.myPntId[ 0 ];
|
||||
aValue.myPnt2 = aVal.myPntId[ 1 ];
|
||||
aValue.myNbConnects = (*anIter).second;
|
||||
|
||||
}
|
||||
|
||||
INFOS("Multiconnection2D_i::GetValuess~");
|
||||
|
Loading…
Reference in New Issue
Block a user