Make redo action insensitive after new command.

Don't erroneously send first_move more than once after autoscroll drag.
This commit is contained in:
nick_m 2015-02-05 19:57:56 +11:00
parent 40c8c26b79
commit f9b2587458
2 changed files with 4 additions and 2 deletions

View File

@ -3434,6 +3434,7 @@ Editor::commit_reversible_command ()
if (_session) {
if (before.size() == 1) {
_session->add_command (new MementoCommand<SelectionMemento>(*(_selection_memento), before.front(), &_selection_memento->get_state ()));
redo_action->set_sensitive(false);
undo_action->set_sensitive(true);
begin_selection_op_history ();
}

View File

@ -390,10 +390,11 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
bool first_move = (_move_threshold_passed != old_move_threshold_passed) ||
from_autoscroll;
motion (event, first_move && !_starting_point_passed);
_starting_point_passed = first_move;
if (first_move && !_starting_point_passed) {
_starting_point_passed = true;
}
_last_pointer_x = _drags->current_pointer_x ();
_last_pointer_y = current_pointer_y ();