]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the bug IPAL22277: Crash on "Find elements by point" dialog box
authorana <ana@opencascade.com>
Mon, 28 Feb 2011 14:52:52 +0000 (14:52 +0000)
committerana <ana@opencascade.com>
Mon, 28 Feb 2011 14:52:52 +0000 (14:52 +0000)
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h

index b32af368153134843fef8708b71afc1e8fcf4b41..e99e2b78744bef33e93ef5af6ccd2efd761bef9f 100644 (file)
@@ -3766,7 +3766,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( 900, OB, mesh_group );                  // ADV_INFO
   //createPopupItem( 902, OB, mesh );                        // STD_INFO
   createPopupItem( 903, OB, mesh_group );                  // WHAT_IS
-  createPopupItem( 904, OB, mesh_group );                  // FIND_ELEM
+  createPopupItem( 904, OB, mesh );                        // FIND_ELEM
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( 801, OB, mesh );                        // CREATE_GROUP
   createPopupItem( 806, OB, mesh );                        // CREATE_GEO_GROUP
@@ -3802,7 +3802,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( 900, View, mesh_group ); // ADV_INFO
   //createPopupItem( 902, View, mesh );       // STD_INFO
   createPopupItem( 903, View, mesh_group ); // WHAT_IS
-  createPopupItem( 904, View, mesh_group ); // FIND_ELEM
+  createPopupItem( 904, View, mesh );       // FIND_ELEM
   popupMgr()->insert( separator(), -1, 0 );
 
   createPopupItem( 1136, OB + " " + View, mesh, "&& (not isAutoColor)" ); // AUTO_COLOR
index a0888e3ffbf5aad8394835d2e5126f167f590ab9..ac6d9f3a903a8f20dd55013895e97248420050cc 100644 (file)
@@ -213,6 +213,7 @@ SMESHGUI_FindElemByPointOp::SMESHGUI_FindElemByPointOp()
   connect(myDlg->myZ,            SIGNAL(valueChanged(double)),    this, SLOT(redisplayPreview()));
   connect(myDlg->myFoundList,    SIGNAL(itemSelectionChanged()),  this, SLOT(onElemSelected()));
   connect(myDlg->myElemTypeCombo,SIGNAL(currentIndexChanged(int)),this, SLOT(onElemTypeChange(int)));
+  connect(myDlg,                 SIGNAL(rejectedDlg()),           this, SLOT(onRejectedDlg()));
 }
 
 //=======================================================================
@@ -305,6 +306,29 @@ void SMESHGUI_FindElemByPointOp::onElemTypeChange(int index)
   myDlg->myFoundList->clear();
 }
 
+//================================================================================
+/*!
+ * \brief Method needed for internal cuisine
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointDlg::reject()
+{
+  emit rejectedDlg();
+  QtxDialog::reject();
+}
+
+//================================================================================
+/*!
+ * \brief Method needed for internal cuisine
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::onRejectedDlg()
+{
+  myMeshIO.Nullify(); 
+}
+
 //================================================================================
 /*!
  * \brief perform it's intention action: find elements
@@ -351,6 +375,7 @@ void SMESHGUI_FindElemByPointOp::onFind()
 
 bool SMESHGUI_FindElemByPointOp::onApply()
 {
+  onRejectedDlg();
   return true;
 }
 
index 72ecaeb7b97d70894cd93a88885740297f932c52..9dd1f8ef64befa72d3bc064bf54487fc10dfc254 100644 (file)
@@ -62,6 +62,8 @@ protected slots:
   virtual bool                   onApply();
 
 private slots:
+
+  void                           onRejectedDlg();
   void                           onSelectionDone();
   void                           onElemSelected();
   void                           onElemTypeChange(int);
@@ -104,6 +106,12 @@ private:
 
   friend class SMESHGUI_FindElemByPointOp;
 
+signals:
+  void                           rejectedDlg();
+
+protected slots:
+  virtual void                   reject();
+
 private slots:
 //void                          ButtonToggled( bool );
 };