mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 14:16:31 +01:00
force LV2 plugin-state save for templates - #6709
This commit is contained in:
parent
440618b463
commit
d14e3ccc24
1 changed files with 11 additions and 3 deletions
|
|
@ -1062,7 +1062,9 @@ LV2Plugin::add_state(XMLNode* root) const
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!_impl->state || !lilv_state_equals(state, _impl->state)) {
|
if (!_plugin_state_dir.empty()
|
||||||
|
|| !_impl->state
|
||||||
|
|| !lilv_state_equals(state, _impl->state)) {
|
||||||
lilv_state_save(_world.world,
|
lilv_state_save(_world.world,
|
||||||
_uri_map.urid_map(),
|
_uri_map.urid_map(),
|
||||||
_uri_map.urid_unmap(),
|
_uri_map.urid_unmap(),
|
||||||
|
|
@ -1071,8 +1073,14 @@ LV2Plugin::add_state(XMLNode* root) const
|
||||||
new_dir.c_str(),
|
new_dir.c_str(),
|
||||||
"state.ttl");
|
"state.ttl");
|
||||||
|
|
||||||
lilv_state_free(_impl->state);
|
if (_plugin_state_dir.empty()) {
|
||||||
_impl->state = state;
|
// normal session save
|
||||||
|
lilv_state_free(_impl->state);
|
||||||
|
_impl->state = state;
|
||||||
|
} else {
|
||||||
|
// template save (dedicated state-dir)
|
||||||
|
lilv_state_free(state);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// State is identical, decrement version and nuke directory
|
// State is identical, decrement version and nuke directory
|
||||||
lilv_state_free(state);
|
lilv_state_free(state);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue