summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2018-02-23 14:37:32 -0600
committerBen Loftis <ben@harrisonconsoles.com>2018-02-23 14:37:32 -0600
commit881c8eeca8df141959861387b8e3af5c48ba287b (patch)
treeef9e49bfa040c7dbf1c9c5dbf0c5a1a04c254328 /gtk2_ardour/editor_ops.cc
parenteb15d37669f7b82b453bb992f253bfe6ee3e7f9e (diff)
Tell the user why Insert/Remove Time failed, rather than fail silently.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 7173e267e6..7ba7e94452 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -7588,9 +7588,21 @@ void
Editor::do_insert_time ()
{
if (selection->tracks.empty()) {
+ MessageDialog msg (_("You must first select some tracks to Insert Time."),
+ true, MESSAGE_INFO, BUTTONS_OK, true);
+ msg.set_position (WIN_POS_MOUSE);
+ msg.run ();
return;
}
+ if (Config->get_edit_mode() == Lock) {
+ MessageDialog msg (_("You cannot insert time in Lock Edit mode."),
+ true, MESSAGE_INFO, BUTTONS_OK, true);
+ msg.set_position (WIN_POS_MOUSE);
+ msg.run ();
+ return;
+ }
+
InsertRemoveTimeDialog d (*this);
int response = d.run ();
@@ -7751,6 +7763,18 @@ void
Editor::do_remove_time ()
{
if (selection->tracks.empty()) {
+ MessageDialog msg (_("You must first select some tracks to Remove Time."),
+ true, MESSAGE_INFO, BUTTONS_OK, true);
+ msg.set_position (WIN_POS_MOUSE);
+ msg.run ();
+ return;
+ }
+
+ if (Config->get_edit_mode() == Lock) {
+ MessageDialog msg (_("You cannot remove time in Lock Edit mode."),
+ true, MESSAGE_INFO, BUTTONS_OK, true);
+ msg.set_position (WIN_POS_MOUSE);
+ msg.run ();
return;
}