rationalize all region selection for editor operations

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3013 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-02-05 21:09:22 +00:00
parent 8f77a84552
commit c2ac101a10
5 changed files with 331 additions and 234 deletions

View file

@ -1328,27 +1328,4 @@ Editor::deselect_all ()
selection->clear ();
}
Editor::ExclusiveRegionSelection::ExclusiveRegionSelection (Editor& ed, RegionView* rv)
: editor (ed),
regionview (rv)
{
if (!rv || ed.current_mouse_mode() != Editing::MouseObject) {
return;
}
if (ed.get_selection().regions.empty() && !ed.get_selection().selected (rv)) {
ed.get_selection().set (rv, false);
remove = true;
} else {
remove = false;
}
}
Editor::ExclusiveRegionSelection::~ExclusiveRegionSelection ()
{
if (remove && regionview) {
editor.get_selection().remove (regionview);
}
}