Browse Source

Move track widget pointer sorting func into track widget class.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
0cbfaff090
2 changed files with 8 additions and 10 deletions
  1. +1
    -10
      Track.C
  2. +7
    -0
      Track_Widget.H

+ 1
- 10
Track.C View File

@@ -27,19 +27,10 @@

queue <Track_Widget *> Track::_delete_queue;



static bool
sort_func ( Track_Widget *lhs, Track_Widget *rhs )
{
return *lhs < *rhs;
}


void
Track::sort ( void )
{
_widgets.sort( sort_func );
_widgets.sort( Track_Widget::sort_func );
}

void


+ 7
- 0
Track_Widget.H View File

@@ -89,6 +89,7 @@ public:
return;

_selection.push_back( this );
_selection.sort( sort_func );

redraw();
}
@@ -216,4 +217,10 @@ public:
virtual void draw_label ( const char *label, Fl_Align align );
virtual int handle ( int m );

static bool
sort_func ( Track_Widget *lhs, Track_Widget *rhs )
{
return *lhs < *rhs;
}

};

Loading…
Cancel
Save