Simplify Group::IsVisible(), GroupsInOrder().
parent
43db2201fd
commit
022d012a44
|
@ -57,15 +57,8 @@ bool SolveSpaceUI::PruneOrphans() {
|
||||||
bool SolveSpaceUI::GroupsInOrder(hGroup before, hGroup after) {
|
bool SolveSpaceUI::GroupsInOrder(hGroup before, hGroup after) {
|
||||||
if(before.v == 0) return true;
|
if(before.v == 0) return true;
|
||||||
if(after.v == 0) return true;
|
if(after.v == 0) return true;
|
||||||
|
int beforep = SK.GetGroup(before)->order;
|
||||||
int beforep = -1, afterp = -1;
|
int afterp = SK.GetGroup(after)->order;
|
||||||
int i;
|
|
||||||
for(i = 0; i < SK.groupOrder.n; i++) {
|
|
||||||
hGroup hg = SK.groupOrder.elem[i];
|
|
||||||
if(hg.v == before.v) beforep = i;
|
|
||||||
if(hg.v == after.v) afterp = i;
|
|
||||||
}
|
|
||||||
if(beforep < 0 || afterp < 0) return false;
|
|
||||||
if(beforep >= afterp) return false;
|
if(beforep >= afterp) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,8 @@ void Group::AddParam(IdList<Param,hParam> *param, hParam hp, double v) {
|
||||||
|
|
||||||
bool Group::IsVisible() {
|
bool Group::IsVisible() {
|
||||||
if(!visible) return false;
|
if(!visible) return false;
|
||||||
if(SS.GroupsInOrder(SS.GW.activeGroup, h)) return false;
|
Group *active = SK.GetGroup(SS.GW.activeGroup);
|
||||||
|
if(order > active->order) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue