Make meter gain entry lose focus after enter is pressed.
git-svn-id: svn://localhost/ardour2/trunk@1350 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6906b4e5ed
commit
770481aeb9
|
@ -906,6 +906,8 @@ class Editor : public PublicEditor
|
|||
void align_relative (ARDOUR::RegionPoint);
|
||||
void naturalize ();
|
||||
|
||||
void reset_focus ();
|
||||
|
||||
void cut ();
|
||||
void copy ();
|
||||
void paste (float times);
|
||||
|
|
|
@ -1086,3 +1086,9 @@ Editor::parameter_changed (const char* parameter_name)
|
|||
|
||||
#undef PARAM_IS
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_focus ()
|
||||
{
|
||||
track_canvas.grab_focus();
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "logmeter.h"
|
||||
#include "gui_thread.h"
|
||||
#include "keyboard.h"
|
||||
#include "public_editor.h"
|
||||
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/route.h>
|
||||
|
@ -563,7 +564,11 @@ GainMeter::gain_activated ()
|
|||
|
||||
f = min (f, 6.0f);
|
||||
|
||||
_io->set_gain (dB_to_coefficient (f), this);
|
||||
_io->set_gain (dB_to_coefficient(f), this);
|
||||
|
||||
if (gain_display.has_focus()) {
|
||||
PublicEditor::instance().reset_focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
|
|||
|
||||
Glib::RefPtr<Gtk::ActionGroup> editor_actions;
|
||||
|
||||
virtual void reset_focus() = 0;
|
||||
|
||||
virtual bool canvas_control_point_event (GdkEvent* event,ArdourCanvas::Item*, ControlPoint*) = 0;
|
||||
virtual bool canvas_line_event (GdkEvent* event,ArdourCanvas::Item*, AutomationLine*) = 0;
|
||||
virtual bool canvas_selection_rect_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*) = 0;
|
||||
|
|
Loading…
Reference in New Issue