GUI does an even stronger check on no undo/redo while recording
This commit is contained in:
parent
41cc35cf6e
commit
e8427ee2cb
@ -119,6 +119,13 @@ using Gtkmm2ext::Keyboard;
|
|||||||
void
|
void
|
||||||
Editor::undo (uint32_t n)
|
Editor::undo (uint32_t n)
|
||||||
{
|
{
|
||||||
|
if (_session && _session->actively_recording()) {
|
||||||
|
/* no undo allowed while recording. Session will check also,
|
||||||
|
but we don't even want to get to that.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_drags->active ()) {
|
if (_drags->active ()) {
|
||||||
_drags->abort ();
|
_drags->abort ();
|
||||||
}
|
}
|
||||||
@ -136,12 +143,19 @@ Editor::undo (uint32_t n)
|
|||||||
void
|
void
|
||||||
Editor::redo (uint32_t n)
|
Editor::redo (uint32_t n)
|
||||||
{
|
{
|
||||||
|
if (_session && _session->actively_recording()) {
|
||||||
|
/* no redo allowed while recording. Session will check also,
|
||||||
|
but we don't even want to get to that.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_drags->active ()) {
|
if (_drags->active ()) {
|
||||||
_drags->abort ();
|
_drags->abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
_session->redo (n);
|
_session->redo (n);
|
||||||
if (_session->redo_depth() == 0) {
|
if (_session->redo_depth() == 0) {
|
||||||
redo_action->set_sensitive(false);
|
redo_action->set_sensitive(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user