+ OCCViewer_Viewer* aViewer = mySelector->viewer();
+ SUIT_ViewWindow* aWnd = aViewer->getViewManager()->getActiveView();
+ OCCViewer_ViewWindow* aViewWnd = dynamic_cast<OCCViewer_ViewWindow*>(aWnd);
+ if (aViewWnd) {
+ return (aViewWnd->interactionStyle() == 0);
+ }
+ return true;
+}
+
+
+//**********************************************
+void NewGeom_SalomeViewer::onKeyPress(SUIT_ViewWindow* theView, QKeyEvent* theEvent)
+{
+ OCCViewer_ViewWindow* aViewWnd = dynamic_cast<OCCViewer_ViewWindow*>(theView);
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ Handle(V3d_View) aView = aViewWnd->getViewPort()->getView();
+
+ bool noModifiers = (theEvent->modifiers() == Qt::NoModifier);
+ if ((theEvent->key() == Qt::Key_N) && noModifiers) {
+ aContext->HilightNextDetected(aView);
+ } else if ((theEvent->key() == Qt::Key_P) && noModifiers) {
+ aContext->HilightPreviousDetected(aView);
+ }