mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
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:
parent
8f77a84552
commit
c2ac101a10
5 changed files with 331 additions and 234 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue