anOpMgr->startOperation(anOpAction);
}
+ static const Events_ID anVisualEvent = Events_Loop::eventByName(EVENT_VISUAL_ATTRIBUTES);
if (anObjects.size() > 0) {
QObjectPtrList::const_iterator anIt = anObjects.begin(), aLast = anObjects.end();
for (; anIt != aLast; anIt++) {
aSketchFeature->data()->attribute(anAttribute));
if (anAuxiliaryAttr)
anAuxiliaryAttr->setValue(isChecked);
+ ModelAPI_EventCreator::get()->sendUpdated(aSketchFeature, anVisualEvent);
}
}
}
anOpMgr->commitOperation();
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+ Events_Loop::loop()->flush(anVisualEvent);
}
bool PartSet_MenuMgr::canSetAuxiliary(bool& theValue) const
: QObject(theModule), myModule(theModule), myIsEditLaunching(false), myIsDragging(false),
myDragDone(false), myIsMouseOverWindow(false),
myIsMouseOverViewProcessed(true), myPreviousUpdateViewerEnabled(true),
- myIsPopupMenuActive(false), myExternalPointsMgr(0), myNoDragMoving(false),
- myIsSketchStarted(false)
+ myIsPopupMenuActive(false), myExternalPointsMgr(0), myNoDragMoving(false)
{
ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
ModuleBase_IViewer* aViewer = anIWorkshop->viewer();
if (!aFOperation)
return;
- myIsSketchStarted = true;
SketcherPrs_Tools::setPixelRatio(ModuleBase_Tools::currentPixelRatio());
myModule->onViewTransformed();
myModule->workshop()->viewer()->setFitter(0);
delete aFitter;
- myIsSketchStarted = false;
-
myIsMouseOverWindow = false;
myIsConstraintsShown[PartSet_Tools::Geometrical] = true;
myIsConstraintsShown[PartSet_Tools::Dimensional] = true;
bool PartSet_SketcherMgr::isObjectOfSketch(const ObjectPtr& theObject) const
{
- bool isFoundObject = false;
-
+ if (!myCurrentSketch.get())
+ return false;
FeaturePtr anObjectFeature = ModelAPI_Feature::feature(theObject);
if (anObjectFeature.get()) {
int aSize = myCurrentSketch->numberOfSubs();
- for (int i = 0; i < aSize && !isFoundObject; i++) {
- FeaturePtr aCurrentFeature = myCurrentSketch->subFeature(i);
- isFoundObject = myCurrentSketch->subFeature(i) == anObjectFeature;
+ FeaturePtr aCurrentFeature;
+ for (int i = 0; i < aSize; i++) {
+ aCurrentFeature = myCurrentSketch->subFeature(i);
+ if (myCurrentSketch->subFeature(i) == anObjectFeature)
+ return true;
}
}
- return isFoundObject;
+ return false;
}
void PartSet_SketcherMgr::onPlaneSelected(const std::shared_ptr<GeomAPI_Pln>& thePlane)