#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::show_selected ()
+TimeAxisView::set_selected (bool yn)
{
- if (selected()) {
+ if (yn == selected()) {
+ return;
+ }
+
+ AxisView::set_selected (yn);
+
+ if (_selected) {
time_axis_frame.set_shadow_type (Gtk::SHADOW_IN);
time_axis_frame.set_name ("MixerStripSelectedFrame");
controls_ebox.set_name (controls_base_selected_name);
}
time_axis_frame.show();
+
}
void
}
}
+// 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;
}
}