mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 21:51:36 +00:00
Variables: an import or library load that changes nothing adds no undo step
dataset.import and variable.loadLibrary added an undo step, cleared Redo and marked a saved document modified even when the variables and data sets came out as they were, such as the same CSV or library loaded again. Both now build the new variables on a copy and record a step only when it differs. variable.loadLibrary's params text and docs/mcp.md say so.
This commit is contained in:
+2
-1
@@ -1652,7 +1652,8 @@ already walks Image Trace. Short agent entry points:
|
||||
reply's `defined` lists the variables the import defined. While the variables are
|
||||
locked, an import whose header would define a variable fails with "variables are locked".
|
||||
- Variable libraries: `variable.loadLibrary {path|xml|dataBase64}` (the Variables panel menu's Load Variable
|
||||
Library…) replaces the document's variables and data sets with a variable library's in one undo step. The library
|
||||
Library…) replaces the document's variables and data sets with a variable library's in one undo step. A load, like a
|
||||
`dataset.import`, adds no undo step when it leaves the variables and data sets as they were. The library
|
||||
is XML whose `variableSets` element holds `variableSet` elements, each with a `variables` element of `variable`
|
||||
elements (`varName`, `trait`) and a `sampleDataSets` element of `sampleDataSet` elements (`dataSetName`). Every
|
||||
variable of the document is deleted with its bindings and values, and every data set is deleted. Then the library's
|
||||
|
||||
Reference in New Issue
Block a user