if (!isActivated)
activateFilters(true);
- const SelectMgr_ListOfFilter& aFilters = myWorkshop->viewer()->AISContext()->Filters();
- SelectMgr_ListIteratorOfListOfFilter anIt(aFilters);
- for (; anIt.More() && aValid; anIt.Next()) {
- Handle(SelectMgr_Filter) aFilter = anIt.Value();
- aValid = aFilter->IsOk(anOwner);
+ Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
+ if (!aContext.IsNull()) {
+ const SelectMgr_ListOfFilter& aFilters = aContext->Filters();
+ SelectMgr_ListIteratorOfListOfFilter anIt(aFilters);
+ for (; anIt.More() && aValid; anIt.Next()) {
+ Handle(SelectMgr_Filter) aFilter = anIt.Value();
+ aValid = aFilter->IsOk(anOwner);
+ }
+ if (!isActivated)
+ activateFilters(false);
}
- if (!isActivated)
- activateFilters(false);
}
// removes created owner
if ((!isSketcher) && (!isEditing))
return;
+ Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
+ if (aContext.IsNull())
+ return;
// MoveTo in order to highlight current object
- aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
+ aContext->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
// Remember highlighted objects for editing
ModuleBase_ISelection* aSelect = aWorkshop->selection();
if (myDragDone) {
//aOp->commit();
myCurrentSelection.clear();
+ /*Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
+ if (!aContext.IsNull()) {
// Reselect edited object
- /*aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
+ aContext->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
if (theEvent->modifiers() & Qt::ShiftModifier)
- aViewer->AISContext()->ShiftSelect();
+ aContext->ShiftSelect();
else
- aViewer->AISContext()->Select();
- */
+ aContext->Select();
+ */
}
}
}
void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
{
connectToPropertyPanel(true);
+ QApplication::setOverrideCursor(QCursor(QIcon(":pictures/button_plus.png").pixmap(20,20)));
}
void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOp)
myIsResetCurrentValue = false;
myIsMouseOverViewProcessed = true;
operationMgr()->onValidateOperation();
+ QApplication::restoreOverrideCursor();
}
void PartSet_SketcherMgr::commitNestedSketch(ModuleBase_Operation* theOperation)
ModuleBase_IViewer* aViewer = theWorkshop->viewer();
Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
+ if (aContext.IsNull())
+ return;
XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(theWorkshop);
XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
ModuleBase_IViewer* aViewer = theWorkshop->viewer();
Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
+ if (aContext.IsNull())
+ return;
+
XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(theWorkshop);
XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
if (noModifiers) {
ModuleBase_IViewer* aViewer = myWorkshop->viewer();
Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
- Handle(V3d_View) aView = aViewer->activeView();
- if ((theEvent->key() == Qt::Key_N))
- aContext->HilightNextDetected(aView);
- else if ((theEvent->key() == Qt::Key_P))
- aContext->HilightPreviousDetected(aView);
+ if (!aContext.IsNull()) {
+ Handle(V3d_View) aView = aViewer->activeView();
+ if ((theEvent->key() == Qt::Key_N))
+ aContext->HilightNextDetected(aView);
+ else if ((theEvent->key() == Qt::Key_P))
+ aContext->HilightPreviousDetected(aView);
+ }
}
}