Remove temporary call of the EraseAll method. Use instead of the EraseDeletedFeatures() if the listener catch Feature_Deleted event.
std::string aGroup = aDelMsg->group();
if (aDelMsg->group().compare("Sketch") == 0) { // Update only Sketch group
- //myModule->workshop()->displayer()->EraseDeletedFeatures();
+ myModule->workshop()->displayer()->EraseDeletedFeatures();
myModule->updateCurrentPreview(aGroup);
}
}
std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> >::const_iterator
anIt = aList.begin(), aLast = aList.end();
- aDisplayer->EraseAll(false);
for (; anIt != aLast; anIt++) {
boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).first;
boost::shared_ptr<GeomAPI_Shape> aPreview = (*anIt).second;
#include "XGUI_ViewerProxy.h"
#include <ModelAPI_Document.h>
+#include <ModelAPI_Data.h>
#include <AIS_InteractiveContext.hxx>
#include <AIS_ListOfInteractive.hxx>
for (; aFIt != aFLast; aFIt++)
{
boost::shared_ptr<ModelAPI_Feature> aFeature = (*aFIt).first;
- if (!aFeature) {
+ if (!aFeature || !aFeature->data()->isValid()) {
Handle(AIS_InteractiveObject) anAIS = (*aFIt).second;
if (!anAIS.IsNull()) {
aContext->Erase(anAIS, false);