mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-31 03:17:49 +05:00
PAL13117: Bug in RemoveObject method.
This commit is contained in:
parent
2014c50784
commit
65c6df3249
@ -196,20 +196,18 @@ void GEOMImpl_IGroupOperations::RemoveObject (Handle(GEOM_Object) theGroup, int
|
|||||||
else {
|
else {
|
||||||
aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1);
|
aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1);
|
||||||
Standard_Boolean isFound = Standard_False;
|
Standard_Boolean isFound = Standard_False;
|
||||||
for(Standard_Integer i = 1, k=1; i<=aLength; i++) {
|
for (Standard_Integer i = 1, k = 1; i <= aLength; i++) {
|
||||||
if(i == aLength && !isFound) {
|
if (aSeq->Value(i) == theSubShapeID) {
|
||||||
SetErrorCode(NOT_EXISTS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(aSeq->Value(i) == theSubShapeID) {
|
|
||||||
isFound = Standard_True;
|
isFound = Standard_True;
|
||||||
continue;
|
} else {
|
||||||
}
|
if (k < aLength) { // this check is to avoid sequence <aNewSeq> overflow
|
||||||
aNewSeq->SetValue(k, aSeq->Value(i));
|
aNewSeq->SetValue(k, aSeq->Value(i));
|
||||||
k++;
|
k++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isFound) {
|
if (!isFound) {
|
||||||
SetErrorCode(NOT_EXISTS);
|
SetErrorCode(NOT_EXISTS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user