summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-02 08:54:33 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-06-02 14:46:35 -0400
commiteee83c25a9e1e182d0ce1d90f5469b0a836f082c (patch)
tree79a548322e25b366430db1c720946457ae4a7f9d /gtk2_ardour/editor_drag.cc
parent050035e7877f683027346b28972e371c1e73bb67 (diff)
make all TimeAxisView derived types return PresentationInfo for sorting
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index c29fa230d4..02e36d2bce 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -527,22 +527,7 @@ Drag::add_midi_region (MidiTimeAxisView* view, bool commit)
struct PresentationInfoTimeAxisViewSorter {
bool operator() (TimeAxisView* a, TimeAxisView* b) {
- RouteTimeAxisView* ra = dynamic_cast<RouteTimeAxisView*> (a);
- RouteTimeAxisView* rb = dynamic_cast<RouteTimeAxisView*> (b);
- /* anything not a route goes at the end */
- if (!ra && rb) {
- return false;
- }
- if (!rb && ra) {
- return true;
- }
- if (!ra && !rb) {
- /* XXXX pointer comparison. Should use
- presentation_info in a time axis view
- */
- return a < b;
- }
- return ra->route()->presentation_info () < rb->route()->presentation_info();
+ return a->presentation_info() < b->presentation_info();
}
};