When choosing color for a new group, consider active, not last, group.
parent
98e0a30a98
commit
2d25bdb51f
|
@ -225,7 +225,7 @@ void Group::MenuGroup(int id) {
|
|||
|
||||
// Copy color from the previous mesh-contributing group.
|
||||
if(g.IsMeshGroup() && SK.groupOrder.n > 0) {
|
||||
Group *running = SK.GetRunningMeshGroup();
|
||||
Group *running = SK.GetRunningMeshGroupFor(SS.GW.activeGroup);
|
||||
if(running != NULL) {
|
||||
g.color = running->color;
|
||||
}
|
||||
|
|
|
@ -853,9 +853,8 @@ BBox Sketch::CalculateEntityBBox(bool includingInvisible) {
|
|||
return box;
|
||||
}
|
||||
|
||||
Group *Sketch::GetRunningMeshGroup() {
|
||||
if(groupOrder.n < 1) return NULL;
|
||||
Group *g = GetGroup(groupOrder.elem[groupOrder.n - 1]);
|
||||
Group *Sketch::GetRunningMeshGroupFor(hGroup h) {
|
||||
Group *g = GetGroup(h);
|
||||
while(g != NULL) {
|
||||
if(g->IsMeshGroup()) {
|
||||
return g;
|
||||
|
|
|
@ -670,7 +670,7 @@ public:
|
|||
void Clear(void);
|
||||
|
||||
BBox CalculateEntityBBox(bool includingInvisible);
|
||||
Group *GetRunningMeshGroup();
|
||||
Group *GetRunningMeshGroupFor(hGroup h);
|
||||
};
|
||||
#undef ENTITY
|
||||
#undef CONSTRAINT
|
||||
|
|
Loading…
Reference in New Issue