do not stupidly try to save punch/loop/session ranges during clear_ranges op

This commit is contained in:
Paul Davis 2014-09-17 09:38:17 -04:00
parent dc924db851
commit f415e24514

View file

@ -2119,15 +2119,7 @@ Editor::clear_ranges ()
_session->begin_reversible_command (_("clear ranges"));
XMLNode &before = _session->locations()->get_state();
Location * looploc = _session->locations()->auto_loop_location();
Location * punchloc = _session->locations()->auto_punch_location();
Location * sessionloc = _session->locations()->session_range_location();
_session->locations()->clear_ranges ();
// re-add these
if (looploc) _session->locations()->add (looploc);
if (punchloc) _session->locations()->add (punchloc);
if (sessionloc) _session->locations()->add (sessionloc);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));