I think it would be better to not repeat well done messages, if object are drawn twice
I think the most easy way to fix this is, to disable drawing the same object again, this would also fix overlapping points labels.
Something like this seems to work:
- (void)addGeometricObjects:(NSArray*)objects_
{
NSMutableArray* tempobjects = [[NSMutableArray alloc]initWithArray:objects_];
for (id newobject in objects_) {
for (id oldobject in _geometricObjects) {
if (EqualCircles(oldobject, newobject) || EqualLines(oldobject, newobject) || EqualLineSegments(oldobject, newobject)|| EqualPoints(oldobject, newobject)){
[tempobjects removeObject:newobject];
}
}
}
NSArray* objects = [[NSArray alloc] initWithArray:tempobjects];
I'm not sure if I'm doing a little bit too much here. I'm a little bit a noob with arrays don't see the reason why some arrays are mutable and some are not, I don't see what the downside is of having an array mutable.
I think it would be better to not repeat well done messages, if object are drawn twice
I think the most easy way to fix this is, to disable drawing the same object again, this would also fix overlapping points labels.
Something like this seems to work:
I'm not sure if I'm doing a little bit too much here. I'm a little bit a noob with arrays don't see the reason why some arrays are mutable and some are not, I don't see what the downside is of having an array mutable.