summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-18 15:56:41 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-18 15:56:41 +0000
commit17cbb458e71abe64cede22e3573816742c2d235f (patch)
treea3d5ce9f976b7e5b9e37074398d0c53c11068d00 /gtk2_ardour
parentb4abc10f716f1ec8d85d8f82b2aa97c11e03bb0c (diff)
fix restore of snap mode (confusion caused by existence of internal/preinternal snap modes)
git-svn-id: svn://localhost/ardour2/branches/3.0@13878 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 22f2d71f0a..554932338b 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -44,6 +44,7 @@
#include "pbd/memento_command.h"
#include "pbd/unknown_type.h"
#include "pbd/unwind.h"
+#include "pbd/stacktrace.h"
#include <glibmm/miscutils.h>
#include <gtkmm/image.h>
@@ -2139,9 +2140,16 @@ Editor::set_snap_to (SnapType st)
void
Editor::set_snap_mode (SnapMode mode)
{
- _snap_mode = mode;
string str = snap_mode_strings[(int)mode];
+ if (_internal_editing) {
+ internal_snap_mode = mode;
+ } else {
+ pre_internal_snap_mode = mode;
+ }
+
+ _snap_mode = mode;
+
if (str != snap_mode_selector.get_active_text ()) {
snap_mode_selector.set_active_text (str);
}
@@ -2289,6 +2297,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
pre_internal_snap_type = (SnapType) string_2_enum (prop->value(), pre_internal_snap_type);
}
+
if ((prop = node.property ("pre-internal-snap-mode"))) {
pre_internal_snap_mode = (SnapMode) string_2_enum (prop->value(), pre_internal_snap_mode);
}