13
0

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
This commit is contained in:
Paul Davis 2013-01-18 15:56:41 +00:00
parent b4abc10f71
commit 17cbb458e7

View File

@ -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);
}