#include "SMESH_TypeFilter.hxx"
#include "SMDS_Mesh.hxx"
-#include "VTKViewer_ViewWindow.h"
-
#include "SUIT_ResourceMgr.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
#include "utilities.h"
#include "SVTK_ViewWindow.h"
bool modal, WFlags fl )
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH",tr("ICON_SELECT")));
Preview = new QCheckBox( GroupContent, "Preview" );
Preview->setText( tr( "SMESH_POLYEDRE_PREVIEW" ) );
GroupContentLayout->addWidget( Preview , 5, 0 );
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
SMESHGUI_CreatePolyhedralVolumeDlgLayout->addWidget( GroupContent, 1, 0 );
{
//disconnect(mySelectionMgr, 0, this, 0);
+ SALOME_ListIO io;
+ mySelectionMgr->selectedObjects( io );
SALOME_ListIO aList;
mySelectionMgr->setSelectedObjects( aList );
myEditCurrentArgument->clear();
}
else
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
AddButton->setEnabled(false);
RemoveButton->setEnabled(false);
} else {
SMESH::SetPointRepresentation(false);
}
- myViewWindow->SetSelectionMode(FaceSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
TextLabelIds->setText( tr( "SMESH_ID_FACES" ) );
myFacesByNodesLabel->hide();
}
//connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ mySelectionMgr->setSelectedObjects( io );
}
//=================================================================================
}
}
- SALOME_ListIO aList;
- mySelectionMgr->setSelectedObjects( aList );
+ //SALOME_ListIO aList;
+ //mySelectionMgr->setSelectedObjects( aList );
mySimulation->SetVisibility(false);
SMESH::UpdateView();
ConstructorsClicked( GetConstructorId() );
void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnCancel()
{
mySelectionMgr->clearFilters();
- SALOME_ListIO aList;
- mySelectionMgr->setSelectedObjects( aList );
+ //SALOME_ListIO aList;
+ //mySelectionMgr->setSelectedObjects( aList );
SMESH::SetPointRepresentation(false);
mySimulation->SetVisibility(false);
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
disconnect( mySelectionMgr, 0, this, 0 );
mySMESHGUI->ResetState() ;
reject() ;
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if ( myNbOkElements>0 && aListId.count()>=3)
AddButton->setEnabled(true);
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if ( myNbOkElements ) {
if (aListId.count()>1){
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
- myViewWindow->SetSelectionMode( FaceSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( FaceSelection );
SelectionIntoArgument();
}
if(isSelected) RemoveButton->setEnabled(true);
else RemoveButton->setEnabled(false);
mySelector->AddOrRemoveIndex(myActor->getIO(), aIndexes, true );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
mySelectionMgr->clearFilters();
aList.Append( myActor->getIO() );
mySelectionMgr->setSelectedObjects( aList );