Am 17.08.2010 12:12, schrieb pulkomandy:
+ if (shape == NULL) + return B_NO_MEMORY; shape->SetName(glyphName.String()); - if (!shape || !icon->Shapes()->AddShape(shape)) { + if (!icon->Shapes()->AddShape(shape)) { delete shape; return B_NO_MEMORY; }The simpler fix would have been to move the SetName() line below the existing checks. :-)I was not sure it would get added to the icon with the new name and too lazy to check.
Ah ok, but I think the name is only stored in the Shape. If anyone needs to know the name and when it changes, it will listen to notifications from the Shape object. But I think it's only relevant when the GUI is already displaying the objects, in which case it would work the same, though.
Best regards, -Stephan