summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/session.h12
-rw-r--r--libs/ardour/session_state.cc20
2 files changed, 25 insertions, 7 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index a1e094a7a4..535317c407 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -874,13 +874,11 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/** Undo some transactions.
* @param n Number of transactions to undo.
*/
- void undo (uint32_t n) {
- _history.undo (n);
- }
-
- void redo (uint32_t n) {
- _history.redo (n);
- }
+ void undo (uint32_t n);
+ /** Redo some transactions.
+ * @param n Number of transactions to undo.
+ */
+ void redo (uint32_t n);
UndoHistory& history() { return _history; }
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 76cf2d3755..41d6d51979 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -4916,3 +4916,23 @@ Session::save_as (SaveAs& saveas)
return 0;
}
+
+void
+Session::undo (uint32_t n)
+{
+ if (actively_recording()) {
+ return;
+ }
+
+ _history.undo (n);
+}
+
+void
+Session::redo (uint32_t n)
+{
+ if (actively_recording()) {
+ return;
+ }
+
+ _history.redo (n);
+}