#include "tooltips.h"
#include "ui_config.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace Gtk;
conditionally_add_to_selection ();
build_display_menu ();
- display_menu->popup (1, when);
+
+ if (!display_menu->items().empty()) {
+ display_menu->popup (1, when);
+ }
}
void
TimeAxisView::set_selected (bool yn)
{
-#if 0
- /* end any name edit in progress */
- if (can_edit_name()) {
- end_name_edit (string(), 0);
- }
-#endif
-
- if (yn == _selected) {
+ if (yn == selected()) {
return;
}
- Selectable::set_selected (yn);
+ AxisView::set_selected (yn);
if (_selected) {
time_axis_frame.set_shadow_type (Gtk::SHADOW_IN);
}
}
+// retuned rect is pushed back into the used_selection_rects list
+// in TimeAxisView::show_selection() which is the only caller.
SelectionRect *
TimeAxisView::get_selection_rect (uint32_t id)
{
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
if ((*i)->id == id) {
- return (*i);
+ SelectionRect* ret = (*i);
+ used_selection_rects.erase (i);
+ return ret;
}
}