summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_selection.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-01-17 01:42:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-01-17 01:42:44 +0000
commit762d2ae936bd78053d9f344ce9392b7867304ae2 (patch)
tree4d5b8655b28f02ba56183b133b87e18b0f9e5d50 /gtk2_ardour/region_selection.h
parentd3071f84e5be7d611b83ce68908da697566a9713 (diff)
fix ordering of cut/copied regions when pasting; ctrl-click now does the right thing the first time its used on a region; fix missing click and other dubious behaviour in new sessions caused by not connecting to Configuration::ParameterChanged in the new session constructor
git-svn-id: svn://localhost/ardour2/trunk@1331 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_selection.h')
-rw-r--r--gtk2_ardour/region_selection.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h
index 7e1d3b0835..5c05a813f9 100644
--- a/gtk2_ardour/region_selection.h
+++ b/gtk2_ardour/region_selection.h
@@ -29,11 +29,7 @@ using std::set;
class RegionView;
-struct RegionComparator {
- bool operator() (const RegionView* a, const RegionView* b) const;
-};
-
-class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::trackable
+class RegionSelection : public std::list<RegionView*>, public sigc::trackable
{
public:
RegionSelection();
@@ -41,9 +37,10 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
RegionSelection& operator= (const RegionSelection&);
- void add (RegionView*, bool dosort = true);
+ void add (RegionView*);
bool remove (RegionView*);
bool contains (RegionView*);
+ void sort_by_position_and_track ();
void clear_all();
@@ -51,14 +48,15 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
return _current_start;
}
- /* collides with list<>::end */
+ /* "end" collides with list<>::end */
nframes_t end_frame () const {
return _current_end;
}
- const list<RegionView *> & by_layer() const { return _bylayer; }
- void by_position (list<RegionView*>&) const;
+ const std::list<RegionView *>& by_layer() const { return _bylayer; }
+ void by_position (std::list<RegionView*>&) const;
+ void by_track (std::list<RegionView*>&) const;
private:
void remove_it (RegionView*);