From: nds Date: Tue, 2 Dec 2014 14:49:15 +0000 (+0300) Subject: Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6 X-Git-Tag: V_0.6.0^2~35^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4c3c61e1535d9fbf5e189796e35d6c238cbac98c;hp=-c;p=modules%2Fshaper.git Merge branch 'Dev_0.6' of newgeom:newgeom into Dev_0.6 --- 4c3c61e1535d9fbf5e189796e35d6c238cbac98c diff --combined src/PartSet/PartSet_Module.cpp index e5b587fe6,490ffdfd9..1e2a511ee --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@@ -94,10 -94,6 +94,10 @@@ PartSet_Module::PartSet_Module(ModuleBa PartSet_Module::~PartSet_Module() { + if (!myDocumentShapeFilter.IsNull()) + myDocumentShapeFilter.Nullify(); + if (!myPlaneFilter.IsNull()) + myPlaneFilter.Nullify(); } void PartSet_Module::registerValidators() @@@ -179,9 -175,6 +179,9 @@@ void PartSet_Module::onOperationStarted myPlaneFilter->setPlane(aPln->impl()); } } + if (myDocumentShapeFilter.IsNull()) + myDocumentShapeFilter = new ModuleBase_ShapeDocumentFilter(myWorkshop); + myWorkshop->viewer()->addSelectionFilter(myDocumentShapeFilter); } void PartSet_Module::onOperationStopped(ModuleBase_Operation* theOperation) @@@ -216,7 -209,6 +216,7 @@@ myCurrentSketch = CompositeFeaturePtr(); myWorkshop->viewer()->removeSelectionFilter(myPlaneFilter); } + myWorkshop->viewer()->removeSelectionFilter(myDocumentShapeFilter); } void PartSet_Module::onPlaneSelected(const std::shared_ptr& thePln) @@@ -318,7 -310,7 +318,7 @@@ void PartSet_Module::onMousePressed(Mod QList aObjects = aSelect->getHighlighted(); myEditingFeatures.clear(); myEditingAttr.clear(); - if (aObjects.size() > 0) { + if (aObjects.size() == 1) { foreach(ModuleBase_ViewerPrs aPrs, aObjects) { FeaturePtr aFeature = ModelAPI_Feature::feature(aObjects.first().object()); if (aFeature) { @@@ -445,6 -437,7 +445,7 @@@ void PartSet_Module::onMouseMoved(Modul if (aSketchFeature) { aSketchFeature->move(dX, dY); ModelAPI_EventCreator::get()->sendUpdated(aSketchFeature, anEvent); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_MOVED)); Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); } }