summaryrefslogtreecommitdiff
path: root/libs/ardour/location.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r--libs/ardour/location.cc91
1 files changed, 2 insertions, 89 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index f9bcd76a0b..579a0e2820 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -372,9 +372,6 @@ Locations::Locations ()
{
current_location = 0;
-#ifdef STATE_MANAGER
- save_state (_("initial"));
-#endif
}
Locations::~Locations ()
@@ -385,27 +382,6 @@ Locations::~Locations ()
delete *i;
i = tmp;
}
-
-#ifdef STATE_MANAGER
-
- std::set<Location*> all_locations;
-
-
- for (StateMap::iterator siter = states.begin(); siter != states.end(); ++siter) {
-
- State* lstate = dynamic_cast<State*> (*siter);
-
- for (LocationList::iterator liter = lstate->locations.begin(); liter != lstate->locations.end(); ++liter) {
- all_locations.insert (*liter);
- }
-
- for (LocationList::iterator siter = lstate->states.begin(); siter != lstate->states.end(); ++siter) {
- all_locations.insert (*siter);
- }
- }
-
- set_delete (&all_locations);
-#endif
}
int
@@ -458,10 +434,6 @@ Locations::clear ()
current_location = 0;
}
-#ifdef STATE_MANAGER
- save_state (_("clear"));
-#endif
-
changed (); /* EMIT SIGNAL */
current_changed (0); /* EMIT SIGNAL */
}
@@ -485,10 +457,6 @@ Locations::clear_markers ()
}
}
-#ifdef STATE_MANAGER
- save_state (_("clear markers"));
-#endif
-
changed (); /* EMIT SIGNAL */
}
@@ -515,10 +483,6 @@ Locations::clear_ranges ()
current_location = 0;
}
-#ifdef STATE_MANAGER
- save_state (_("clear ranges"));
-#endif
-
changed (); /* EMIT SIGNAL */
current_changed (0); /* EMIT SIGNAL */
}
@@ -535,10 +499,6 @@ Locations::add (Location *loc, bool make_current)
}
}
-#ifdef STATE_MANAGER
- save_state (_("add"));
-#endif
-
added (loc); /* EMIT SIGNAL */
if (make_current) {
@@ -575,11 +535,8 @@ Locations::remove (Location *loc)
}
if (was_removed) {
-#ifdef STATE_MANAGER
- save_state (_("remove"));
-#endif
-
- removed (loc); /* EMIT SIGNAL */
+
+ removed (loc); /* EMIT SIGNAL */
if (was_current) {
current_changed (0); /* EMIT SIGNAL */
@@ -592,9 +549,6 @@ Locations::remove (Location *loc)
void
Locations::location_changed (Location* loc)
{
-#ifdef STATE_MANAGER
- save_state (X_("location changed"));
-#endif
changed (); /* EMIT SIGNAL */
}
@@ -834,47 +788,6 @@ Locations::auto_punch_location () const
return 0;
}
-#ifdef STATE_MANAGER
-StateManager::State*
-Locations::state_factory (std::string why) const
-{
- State* state = new State (why);
-
- state->locations = locations;
-
- for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
- state->states.push_back (new Location (**i));
- }
-
- return state;
-}
-
-Change
-Locations::restore_state (StateManager::State& state)
-{
- {
- Glib::Mutex::Lock lm (lock);
- State* lstate = dynamic_cast<State*> (&state);
-
- locations = lstate->locations;
- LocationList& states = lstate->states;
- LocationList::iterator l, s;
-
- for (l = locations.begin(), s = states.begin(); s != states.end(); ++s, ++l) {
- (*l) = (*s);
- }
- }
-
- return Change (0);
-}
-
-UndoAction
-Locations::get_memento () const
-{
- return sigc::bind (mem_fun (*(const_cast<Locations*> (this)), &StateManager::use_state), _current_state_id);
-}
-#endif
-
uint32_t
Locations::num_range_markers () const
{