From 506863bf57940e277a3a129b5d4fcd0299a13015 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 Jul 2018 18:19:19 +0200 Subject: Add an API to reset export-handler configs. config_map.erase() is only called in ExportHandler::finish_timespan(). When an export fails (throw) or is aborted, the export-handler's config remains as is and the next export will run it again. The export-handler is global, per session and ExportHandler::add_export_config() only ever inserts or ignores insert. This is in preparation to fix: 1) export to invalid path -> fail, error is thrown 2) correct path -> new config is inserted in the map 3) try to export again, first runs the not-completed export from (1) -> constant errors. --- libs/ardour/export_handler.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/ardour/export_handler.cc') diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index df74bda065..3cad72c8d9 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -465,6 +465,13 @@ ExportHandler::finish_timespan () start_timespan (); } +void +ExportHandler::reset () +{ + config_map.clear (); + graph_builder->reset (); +} + /*** CD Marker stuff ***/ struct LocationSortByStart { -- cgit v1.2.3