Break the dependency between an imported group and its parent.
Per correspondence with Jonathan the dependency serves no useful purpose. It also prevents safely deleting groups preceding imported groups.pull/4/head
parent
34a5d87011
commit
f82767ae79
|
@ -451,6 +451,11 @@ bool SolveSpaceUI::LoadFromFile(const std::string &filename) {
|
|||
char *key = line, *val = e+1;
|
||||
LoadUsingTable(key, val);
|
||||
} else if(strcmp(line, "AddGroup")==0) {
|
||||
// legacy files have a spurious dependency between imported groups
|
||||
// and their parent groups, remove
|
||||
if(sv.g.type == Group::IMPORTED)
|
||||
sv.g.opA.v = 0;
|
||||
|
||||
SK.group.Add(&(sv.g));
|
||||
sv.g = {};
|
||||
sv.g.scale = 1; // default is 1, not 0; so legacy files need this
|
||||
|
|
|
@ -186,7 +186,6 @@ void Group::MenuGroup(int id) {
|
|||
|
||||
case GraphicsWindow::MNU_GROUP_IMPORT: {
|
||||
g.type = IMPORTED;
|
||||
g.opA = SS.GW.activeGroup;
|
||||
if(g.impFile.empty()) {
|
||||
if(!GetOpenFile(g.impFile, "", SLVS_PATTERN)) return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue