Import missing styles from linked files.
parent
9e512882d1
commit
8d07a6b4f4
|
@ -94,6 +94,8 @@ Bugs fixed:
|
||||||
* Paste Transformed with a negative scale does not invert arcs.
|
* Paste Transformed with a negative scale does not invert arcs.
|
||||||
* The tangent arc now modifies the original entities instead of deleting
|
* The tangent arc now modifies the original entities instead of deleting
|
||||||
them, such that their constraints are retained.
|
them, such that their constraints are retained.
|
||||||
|
* When linking a sketch file, missing custom styles are now imported from
|
||||||
|
the linked file.
|
||||||
|
|
||||||
2.x
|
2.x
|
||||||
---
|
---
|
||||||
|
|
|
@ -732,7 +732,13 @@ bool SolveSpaceUI::LoadEntitiesFromFile(const Platform::Path &filename, EntityLi
|
||||||
} else if(strcmp(line, "AddConstraint")==0) {
|
} else if(strcmp(line, "AddConstraint")==0) {
|
||||||
|
|
||||||
} else if(strcmp(line, "AddStyle")==0) {
|
} else if(strcmp(line, "AddStyle")==0) {
|
||||||
|
// Linked file contains a style that we don't have yet,
|
||||||
|
// so import it.
|
||||||
|
if (SK.style.FindByIdNoOops(sv.s.h) == nullptr) {
|
||||||
|
SK.style.Add(&(sv.s));
|
||||||
|
}
|
||||||
|
sv.s = {};
|
||||||
|
Style::FillDefaultStyle(&sv.s);
|
||||||
} else if(strcmp(line, VERSION_STRING)==0) {
|
} else if(strcmp(line, VERSION_STRING)==0) {
|
||||||
|
|
||||||
} else if(StrStartsWith(line, "Triangle ")) {
|
} else if(StrStartsWith(line, "Triangle ")) {
|
||||||
|
|
Loading…
Reference in New Issue