Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed validators for Boolean and Intersection
[modules/shaper.git]
/
src
/
GeomValidators
/
GeomValidators_IntersectionSelection.cpp
diff --git
a/src/GeomValidators/GeomValidators_IntersectionSelection.cpp
b/src/GeomValidators/GeomValidators_IntersectionSelection.cpp
index ec2a886e0e8b687b69469f670c1e4c664580b55c..039b0eda7b8484991d5bb3ded885bf7147c864e8 100644
(file)
--- a/
src/GeomValidators/GeomValidators_IntersectionSelection.cpp
+++ b/
src/GeomValidators/GeomValidators_IntersectionSelection.cpp
@@
-47,13
+47,19
@@
bool GeomValidators_IntersectionSelection::isValid(const AttributePtr& theAttrib
return false;
}
std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
return false;
}
std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
+ GeomShapePtr aContextShape = aContext->shape();
if(!aShape.get()) {
if(!aShape.get()) {
- aShape = aContext
->shape()
;
+ aShape = aContext
Shape
;
}
if(!aShape.get()) {
theError = "Error: empty shape.";
return false;
}
}
if(!aShape.get()) {
theError = "Error: empty shape.";
return false;
}
+ if(!aShape->isEqual(aContextShape)) {
+ theError = "Error: Local selection not allowed.";
+ return false;
+ }
+
int aShapeType = aShape->shapeType();
// Allow to select edges, faces and solids.
if(aShapeType != GeomAPI_Shape::EDGE &&
int aShapeType = aShape->shapeType();
// Allow to select edges, faces and solids.
if(aShapeType != GeomAPI_Shape::EDGE &&