mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
myVectorDefinition(NONE_SELECT),
myFilterDlg( 0 ),
- mySelectedObject(SMESH::SMESH_IDSource::_nil())
+ mySelectedObject(SMESH::SMESH_IDSource::_nil()),
+ myActor(0)
{
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
}
SMESH::UpdateView();
+ SMESH::Update(myIO, SMESH::eDisplay);
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
mySMESHGUI->updateObjBrowser(true); // new groups may appear
Init(false);
//=================================================================================
void SMESHGUI_RevolutionDlg::ClickOnCancel()
{
- disconnect(mySelectionMgr, 0, this, 0);
- mySelectionMgr->clearFilters();
- //mySelectionMgr->clearSelected();
- if (SMESH::GetCurrentVtkView()) {
- SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
- SMESH::SetPointRepresentation(false);
- }
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
- aViewWindow->SetSelectionMode(ActorSelection);
- mySMESHGUI->ResetState();
reject();
}
+void SMESHGUI_RevolutionDlg::reject()
+{
+ close();
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
if (myBusy) return;
// clear
- myActor = 0;
QString aString = "";
myBusy = true;
return;
Handle(SALOME_InteractiveObject) IO = aList.First();
- myMesh = SMESH::GetMeshByIO(IO);
- if (myMesh->_is_nil())
+ SMESH::SMESH_Mesh_var aMeshVar = SMESH::GetMeshByIO(IO);
+ if (aMeshVar->_is_nil())
return;
- myActor = SMESH::FindActorByObject(myMesh);
- if (!myActor)
- myActor = SMESH::FindActorByEntry(IO->getEntry());
- if (!myActor)
+ SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
+ if (!anActor)
+ anActor = SMESH::FindActorByEntry(IO->getEntry());
+ if (!anActor)
return;
int aNbUnits = 0;
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
myElementsId = "";
+ myMesh = aMeshVar;
+ myActor = anActor;
+ myIO = IO;
// MakeGroups is available if there are groups
if ( myMesh->NbGroups() == 0 ) {
myNbOkElements = true;
} else {
- SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
+ SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
if (!aMesh)
return;
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
int aConstructorId = GetConstructorId();
- myEditCurrentArgument = (QWidget*)SpinBox_X;
if (aConstructorId == 0)
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*)
{
/* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-// function : hideEvent()
-// purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*)
-{
- if (!isMinimized())
- ClickOnCancel();
+ disconnect(mySelectionMgr, 0, this, 0);
+ mySelectionMgr->clearFilters();
+ //mySelectionMgr->clearSelected();
+ if (SMESH::GetCurrentVtkView()) {
+ SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+ SMESH::SetPointRepresentation(false);
+ }
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
+ mySMESHGUI->ResetState();
}
//=======================================================================
if(!action)
return;
+ disconnect(mySelectionMgr, 0, this, 0);
+
switch(myMenuActions[action]) {
case POINT_SELECT:
SMESH::SetPointRepresentation(true);
// SMESH includes
#include "SMESH_SMESHGUI.hxx"
+// SALOME GUI includes
+#include <SALOME_InteractiveObject.hxx>
+
// Qt includes
#include <QDialog>
#include <QMap>
SMESHGUI_RevolutionDlg( SMESHGUI* );
~SMESHGUI_RevolutionDlg();
+ void reject();
+
private:
enum {NONE_SELECT, POINT_SELECT, FACE_SELECT};
void Init( bool = true);
void closeEvent( QCloseEvent* );
void enterEvent( QEvent* ); /* mouse enter the QWidget */
- void hideEvent( QHideEvent* ); /* ESC key */
void keyPressEvent( QKeyEvent* );
int GetConstructorId();
bool IsAxisOk();
QString myElementsId;
QWidget* myEditCurrentArgument; /* Current argument */
SVTK_Selector* mySelector;
+ Handle(SALOME_InteractiveObject) myIO;
SMESH::SMESH_IDSource_var mySelectedObject;