aDisplayer->activate(aFeature, aModes);
}
}
- } else {
+ }// else {
// Activate results of current feature for selection
//FeaturePtr aFeature = theOperation->feature();
//XGUI_Displayer* aDisplayer = aXWshp->displayer();
//std::list<ResultPtr>::const_iterator aIt;
//for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
// aDisplayer->activate(*aIt);
- //}
-
-
-
- }
- // Clear selection done during operation
- aDisplayer->clearSelected();
+ //}
+ //}
}
void PartSet_Module::onContextMenuCommand(const QString& theId, bool isChecked)
if (commit()) {
emit featureConstructed(feature(), FM_Deactivation);
- bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
- if (aHasShift && !theHighlighted.empty()) {
- QList<ObjectPtr> aSelected;
- std::list<ModuleBase_ViewerPrs>::const_iterator aIt;
- for (aIt = theSelected.cbegin(); aIt != theSelected.cend(); ++aIt)
- aSelected.append((*aIt).object());
+ //bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
+ //if (aHasShift && !theHighlighted.empty()) {
+ // QList<ObjectPtr> aSelected;
+ // std::list<ModuleBase_ViewerPrs>::const_iterator aIt;
+ // for (aIt = theSelected.cbegin(); aIt != theSelected.cend(); ++aIt)
+ // aSelected.append((*aIt).object());
/*for (aIt = theHighlighted.cbegin(); aIt != theHighlighted.cend(); ++aIt) {
if (!aSelected.contains((*aIt).object()))
aSelected.append((*aIt).object());
}*/
//aSelected.push_back(feature());
//aSelected.push_back(theHighlighted.front().object());
- emit setSelection(aSelected);
- } else if (aFeature) {
+ //emit setSelection(aSelected);
+ //} else
+ if (aFeature) {
restartOperation(PartSet_OperationFeatureEdit::Type(), aFeature);
}
}
void XGUI_Displayer::clearSelected()
{
Handle(AIS_InteractiveContext) aContext = AISContext();
- if (aContext)
+ if (aContext) {
+ aContext->UnhilightCurrents(false);
aContext->ClearSelected();
+ }
}
void XGUI_Displayer::eraseAll(const bool isUpdateViewer)
if (myStartPnt == myEndPnt) {
// the MoveTo is necessary for the second click in the same point. Otherwise the selection is lost.
- Handle(V3d_View) aView3d = theWindow->viewPort()->getView();
- if (!aView3d.IsNull()) {
- myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d);
- }
+ //Handle(V3d_View) aView3d = theWindow->viewPort()->getView();
+ //if (!aView3d.IsNull()) {
+ // myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d);
+ //}
if (aHasShift && myMultiSelectionEnabled)
myAISContext->ShiftSelect();
else