13
0

if actively recording, prevent interaction between mouse and audio clock widget(s)

This commit is contained in:
Paul Davis 2017-05-31 13:04:03 -04:00
parent d35dfa9c93
commit 82cb046fa3

View File

@ -1520,6 +1520,11 @@ AudioClock::index_to_field (int index) const
bool
AudioClock::on_button_press_event (GdkEventButton *ev)
{
if (!_session || _session->actively_recording()) {
/* swallow event, do nothing */
return true;
}
switch (ev->button) {
case 1:
if (editable && !_off) {
@ -1563,6 +1568,11 @@ AudioClock::on_button_press_event (GdkEventButton *ev)
bool
AudioClock::on_button_release_event (GdkEventButton *ev)
{
if (!_session || _session->actively_recording()) {
/* swallow event, do nothing */
return true;
}
if (editable && !_off) {
if (dragging) {
gdk_pointer_ungrab (GDK_CURRENT_TIME);
@ -1636,7 +1646,7 @@ AudioClock::on_scroll_event (GdkEventScroll *ev)
int index;
int trailing;
if (editing || _session == 0 || !editable || _off) {
if (editing || _session == 0 || !editable || _off || _session->actively_recording()) {
return false;
}
@ -1700,7 +1710,7 @@ AudioClock::on_scroll_event (GdkEventScroll *ev)
bool
AudioClock::on_motion_notify_event (GdkEventMotion *ev)
{
if (editing || _session == 0 || !dragging) {
if (editing || _session == 0 || !dragging || _session->actively_recording()) {
return false;
}