mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
Merge branch 'selection_fixes' of https://github.com/nmains/ardour into cairocanvas
This commit is contained in:
commit
101248d62e
2 changed files with 29 additions and 14 deletions
|
|
@ -64,9 +64,14 @@ ExportFilename::ExportFilename (Session & session) :
|
|||
|
||||
folder = session.session_directory().export_path();
|
||||
|
||||
XMLNode * instant_node = session.instant_xml ("ExportFilename");
|
||||
if (instant_node) {
|
||||
set_state (*instant_node);
|
||||
XMLNode * extra_node = session.extra_xml ("ExportFilename");
|
||||
/* Legacy sessions used Session instant.xml for this */
|
||||
if (!extra_node) {
|
||||
session.instant_xml ("ExportFilename");
|
||||
}
|
||||
|
||||
if (extra_node) {
|
||||
set_state (*extra_node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -87,9 +92,9 @@ ExportFilename::get_state ()
|
|||
add_field (node, "time", include_time, enum_2_string (time_format));
|
||||
add_field (node, "date", include_date, enum_2_string (date_format));
|
||||
|
||||
XMLNode * instant_node = new XMLNode ("ExportRevision");
|
||||
instant_node->add_property ("revision", to_string (revision, std::dec));
|
||||
session.add_instant_xml (*instant_node);
|
||||
XMLNode * extra_node = new XMLNode ("ExportRevision");
|
||||
extra_node->add_property ("revision", to_string (revision, std::dec));
|
||||
session.add_extra_xml (*extra_node);
|
||||
|
||||
return *node;
|
||||
}
|
||||
|
|
@ -144,8 +149,13 @@ ExportFilename::set_state (const XMLNode & node)
|
|||
include_date = pair.first;
|
||||
date_format = (DateFormat) string_2_enum (pair.second, date_format);
|
||||
|
||||
XMLNode * instant_node = session.instant_xml ("ExportRevision");
|
||||
if (instant_node && (prop = instant_node->property ("revision"))) {
|
||||
XMLNode * extra_node = session.extra_xml ("ExportRevision");
|
||||
/* Legacy sessions used Session instant.xml for this */
|
||||
if (!extra_node) {
|
||||
extra_node = session.instant_xml ("ExportRevision");
|
||||
}
|
||||
|
||||
if (extra_node && (prop = extra_node->property ("revision"))) {
|
||||
revision = atoi (prop->value());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,17 +114,22 @@ ExportProfileManager::ExportProfileManager (Session & s, ExportType type)
|
|||
|
||||
ExportProfileManager::~ExportProfileManager ()
|
||||
{
|
||||
XMLNode * instant_xml (new XMLNode (xml_node_name));
|
||||
serialize_profile (*instant_xml);
|
||||
session.add_instant_xml (*instant_xml, false);
|
||||
XMLNode * extra_xml (new XMLNode (xml_node_name));
|
||||
serialize_profile (*extra_xml);
|
||||
session.add_extra_xml (*extra_xml);
|
||||
}
|
||||
|
||||
void
|
||||
ExportProfileManager::load_profile ()
|
||||
{
|
||||
XMLNode * instant_node = session.instant_xml (xml_node_name);
|
||||
if (instant_node) {
|
||||
set_state (*instant_node);
|
||||
XMLNode * extra_node = session.extra_xml (xml_node_name);
|
||||
/* Legacy sessions used Session instant.xml for this */
|
||||
if (!extra_node) {
|
||||
extra_node = session.instant_xml (xml_node_name);
|
||||
}
|
||||
|
||||
if (extra_node) {
|
||||
set_state (*extra_node);
|
||||
} else {
|
||||
XMLNode empty_node (xml_node_name);
|
||||
set_state (empty_node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue