+
+//================================================================================
+/*
+* \brief Process InteractiveSelectionChanged event
+*/
+//================================================================================
+
+void SMESHGUI_MakeNodeAtPointOp::processStyleEvents(unsigned long theEvent, void* theCallData) {
+ if (theEvent == SVTK::InteractiveSelectionChanged) {
+ double* aCoord = (double*)theCallData;
+ myDlg->myDestinationX->SetValue(aCoord[0]);
+ myDlg->myDestinationY->SetValue(aCoord[1]);
+ myDlg->myDestinationZ->SetValue(aCoord[2]);
+ redisplayPreview();
+ }
+}
+
+//================================================================================
+/*
+* \brief Process LeftButtonPressEvent event
+*/
+//================================================================================
+void SMESHGUI_MakeNodeAtPointOp::processInteractorEvents(unsigned long theEvent, void* theCallData) {
+ (void*)theCallData;
+ if (theEvent == vtkCommand::LeftButtonPressEvent) {
+ bool control = myRWInteractor->GetDevice()->GetControlKey();
+ bool shift = myRWInteractor->GetDevice()->GetControlKey();
+ if (GetConstructorId() == INTERACTIVE_MODE && myDlg->myDestBtn->isChecked() && !shift && !control) {
+ if (SVTK_ViewWindow* svtkViewWindow = SMESH::GetViewWindow(SMESHGUI::GetSMESHGUI())) {
+ svtkViewWindow->activateInteractiveSelection();
+ }
+ }
+ }
+ /*
+ if ( myRWInteractor && myRWInteractor->GetDevice() && myInteractorStyle ) {
+ int xClick, yClick; // Last click position
+ myRWInteractor->GetDevice()->GetEventPosition(xClick, yClick);
+ double nodeCoords[3];
+ vtkInteractorObserver::ComputeWorldToDisplay(myRWInteractor->GetRenderer()->GetDevice(),
+ myDlg->myDestinationX->GetValue(),
+ myDlg->myDestinationY->GetValue(),
+ myDlg->myDestinationZ->GetValue(),
+ nodeCoords);
+ double rad = std::sqrt(std::pow(xClick - nodeCoords[0], 2) + std::pow(yClick - nodeCoords[1], 2));
+ if (rad < SELECTION_PRECISION) {
+ if (SVTK_ViewWindow* svtkViewWindow = SMESH::GetViewWindow(mySMESHGUI)) {
+ svtkViewWindow->activateInteractiveSelection();
+ }
+ }
+ }*/
+}