diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-04-26 12:14:50 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-04-26 12:14:50 +0000 |
commit | ee8f2979896a2c634aeb225933f63e1b1e92702f (patch) | |
tree | 05fe1bb5a1e291292493438481ee0242e0da0fe4 | |
parent | b74fb993329de5ae039bece11d1551aec728b2d7 (diff) |
do not unnecessarily recompute streamview item heights; set axis view item name text to an empty string, not just hidden if no text will fit
git-svn-id: svn://localhost/ardour2/trunk@1749 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/editor.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/streamview.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 736510fdc6..a9a9a39511 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3776,7 +3776,7 @@ Editor::idle_visual_changer () } } - return 0; + return 0; /* this is always a one-shot call */ } struct EditorOrderTimeAxisSorter { diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index f39abf192c..c46571ada6 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -4761,7 +4761,7 @@ Editor::mouse_rename_region (ArdourCanvas::Item* item, GdkEvent* event) string str; prompter.get_result(str); if (str.length()) { - clicked_regionview->region()->set_name (str); + clicked_regionview->region()->set_name (str); } break; } diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 04b5269ab0..2a5c13a224 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -111,16 +111,16 @@ StreamView::set_height (gdouble h) return -1; } + if (canvas_rect->property_y2() == h) { + return 0; + } + canvas_rect->property_y2() = h; for (RegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) { (*i)->set_height (h); } - /*for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) { - (*i)->set_height (h); - }*/ - for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) { RecBoxInfo &recbox = (*i); recbox.rectangle->property_y2() = h - 1.0; diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 37daaf9ecc..7830e8f437 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -18,6 +18,7 @@ */ #include <pbd/error.h> +#include <pbd/stacktrace.h> #include <ardour/types.h> #include <ardour/ardour.h> @@ -571,7 +572,7 @@ TimeAxisViewItem::set_name_text(const ustring& new_name) * @param h the new height */ void -TimeAxisViewItem::set_height(double height) +TimeAxisViewItem::set_height (double height) { if (name_highlight) { if (height < NAME_HIGHLIGHT_THRESH) { @@ -975,8 +976,7 @@ TimeAxisViewItem::reset_name_width (double pixel_width) } if (n == 0) { - /* nothing will fit */ - name_text->hide (); + name_text->property_text() = ""; last_name_text_width = pixel_width; return; } |