mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-20 20:36:01 +01:00
Workaround for gui hang when adding gain points (#2048)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2999 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
06d8efc228
commit
43ccd2d7e5
3 changed files with 21 additions and 3 deletions
|
|
@ -288,6 +288,8 @@ Editor::Editor ()
|
|||
verbose_cursor_on = true;
|
||||
route_removal = false;
|
||||
show_automatic_regions_in_region_list = true;
|
||||
last_item_entered = 0;
|
||||
last_item_entered_n = 0;
|
||||
|
||||
region_list_sort_type = (Editing::RegionListSortType) 0;
|
||||
have_pending_keyboard_selection = false;
|
||||
|
|
|
|||
|
|
@ -1274,6 +1274,14 @@ class Editor : public PublicEditor
|
|||
bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
||||
bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
||||
bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
|
||||
|
||||
|
||||
// These variables are used to detect a feedback loop and break it to avoid a gui hang
|
||||
private:
|
||||
ArdourCanvas::Item *last_item_entered;
|
||||
int last_item_entered_n;
|
||||
public:
|
||||
|
||||
bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
|
||||
bool canvas_region_view_name_highlight_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
|
||||
bool canvas_region_view_name_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
|
||||
|
|
|
|||
|
|
@ -1141,6 +1141,11 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
Marker * marker;
|
||||
double fraction;
|
||||
|
||||
if (last_item_entered != item) {
|
||||
last_item_entered = item;
|
||||
last_item_entered_n = 0;
|
||||
}
|
||||
|
||||
switch (item_type) {
|
||||
case GainControlPointItem:
|
||||
if (mouse_mode == MouseGain) {
|
||||
|
|
@ -1156,12 +1161,15 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
|
||||
fraction = 1.0 - (cp->get_y() / cp->line.height());
|
||||
|
||||
set_verbose_canvas_cursor (cp->line.get_verbose_cursor_string (fraction), at_x, at_y);
|
||||
show_verbose_canvas_cursor ();
|
||||
|
||||
if (is_drawable() && !_scrubbing) {
|
||||
track_canvas.get_window()->set_cursor (*fader_cursor);
|
||||
}
|
||||
|
||||
last_item_entered_n++;
|
||||
set_verbose_canvas_cursor (cp->line.get_verbose_cursor_string (fraction), at_x, at_y);
|
||||
if (last_item_entered_n < 10) {
|
||||
show_verbose_canvas_cursor ();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue