N_("Slide"),
N_("Splice"),
N_("Ripple"),
- N_("Constrained"),
+ N_("Lock"),
0
};
edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Slide], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Slide)));
// edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Splice], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Splice)));
edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Ripple], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Ripple)));
- edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Constrained], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Constrained)));
+ edit_mode_selector.AddMenuElem (MenuElem ( edit_mode_strings[(int)Lock], sigc::bind (sigc::mem_fun(*this, &Editor::edit_mode_selection_done), (EditMode) Lock)));
set_size_request_to_display_given_text (edit_mode_selector, edit_mode_strings, COMBO_TRIANGLE_WIDTH, 2);
}
switch (Config->get_edit_mode()) {
case Slide:
if (Profile->get_sae()) {
- Config->set_edit_mode (Constrained);
+ Config->set_edit_mode (Lock);
} else {
Config->set_edit_mode (Ripple);
}
break;
case Splice:
case Ripple:
- Config->set_edit_mode (Constrained);
+ Config->set_edit_mode (Lock);
break;
- case Constrained:
+ case Lock:
Config->set_edit_mode (Slide);
break;
}
// ActionManager::register_action (editor_actions, "set-edit-splice", _("Splice"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Splice));
ActionManager::register_action (editor_actions, "set-edit-ripple", _("Ripple"), bind (mem_fun (*this, &Editor::set_edit_mode), Ripple));
ActionManager::register_action (editor_actions, "set-edit-slide", _("Slide"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Slide));
- ActionManager::register_action (editor_actions, "set-edit-constrained", S_("EditMode|Constrained"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Constrained));
+ ActionManager::register_action (editor_actions, "set-edit-lock", S_("EditMode|Lock"), sigc::bind (sigc::mem_fun (*this, &Editor::set_edit_mode), Lock));
ActionManager::register_action (editor_actions, "cycle-edit-mode", _("Cycle Edit Mode"), sigc::mem_fun (*this, &Editor::cycle_edit_mode));
ActionManager::register_action (editor_actions, X_("SnapTo"), _("Snap to"));
/* just changed */
if (fabs (current_pointer_y() - _grab_y) > fabs (current_pointer_x() - _grab_x)) {
- if ((event->motion.state & Gdk::BUTTON2_MASK) || Config->get_edit_mode() == Constrained) {
+ if ((event->motion.state & Gdk::BUTTON2_MASK) && Config->get_edit_mode() != Lock) {
_x_constrained = true;
_y_constrained = false;
}
_initially_vertical = true;
} else {
- if ((event->motion.state & Gdk::BUTTON2_MASK) || Config->get_edit_mode() == Constrained) {
+ if ((event->motion.state & Gdk::BUTTON2_MASK) && Config->get_edit_mode() != Lock) {
_x_constrained = false;
_y_constrained = true;
}
_initially_vertical = false;
}
- if ((event->motion.state & Gdk::BUTTON2_MASK) && Config->get_edit_mode() == Constrained) {
- _x_constrained = false;
+ if (Config->get_edit_mode() == Lock) {
+ if (event->button.state & Gdk::BUTTON2_MASK) {
+ _x_constrained = false;
+ } else {
+ _x_constrained = true;
+ }
_y_constrained = false;
}
}
}
double dx = 0;
- bool x_move_allowed = !_x_constrained;
+
+ bool const x_move_allowed = !_x_constrained;
if ((*pending_region_position != _last_frame_position) && x_move_allowed) {
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*r);
if (mrv) {
double sd = 0.0;
- if (Keyboard::modifier_state_contains (event->button.state, Keyboard::TertiaryModifier)) {
+ if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::snap_delta_modifier())) {
sd = _snap_delta;
}
mrv->update_resizing (nb, at_front, _drags->current_pointer_x() - grab_x(), relative, sd);
assert (nb);
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*r);
double sd = 0.0;
- if (Keyboard::modifier_state_contains (event->button.state, Keyboard::TertiaryModifier)) {
+ if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::snap_delta_modifier())) {
sd = _snap_delta;
}
if (mrv) {
{
bool commit = false;
- if (Config->get_edit_mode() == Constrained) {
+ if (Config->get_edit_mode() == Lock) {
return;
}
{
bool commit = false;
- if (Config->get_edit_mode() == Constrained) {
- error << (_("Cannot insert or delete time when in Constrained edit.")) << endmsg;
+ if (Config->get_edit_mode() == Lock) {
+ error << (_("Cannot insert or delete time when in Lock edit.")) << endmsg;
return;
}
Slide,
Splice,
Ripple,
- Constrained
+ Lock
};
enum RegionSelectionAfterSplit {
REGISTER_ENUM (Slide);
REGISTER_ENUM (Splice);
REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order?
- REGISTER_ENUM (Constrained);
+ REGISTER_ENUM (Lock);
REGISTER (_EditMode);
/*
* Splice mode is undefined, undocumented, and basically fubar'ed
return Slide;
} else if (str == _("Ripple")) {
return Ripple;
- } else if (str == _("Constrained")) {
- return Constrained;
+ } else if (str == _("Lock")) {
+ return Lock;
}
fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg;
abort(); /*NOTREACHED*/
case Slide:
return _("Slide");
- case Constrained:
- return _("Constrained");
+ case Lock:
+ return _("Lock");
case Ripple:
return _("Ripple");