Mercurial > hg > svgui
diff view/ViewManager.cpp @ 765:410816717c2c tony_integration
Merge from tonioni branch
author | Chris Cannam |
---|---|
date | Wed, 07 May 2014 15:12:13 +0100 |
parents | b75c95e7f906 |
children | c58569bd952e 4c8ca536b54f |
line wrap: on
line diff
--- a/view/ViewManager.cpp Wed Apr 02 08:53:32 2014 +0100 +++ b/view/ViewManager.cpp Wed May 07 15:12:13 2014 +0100 @@ -258,6 +258,14 @@ } void +ViewManager::addSelectionQuietly(const Selection &selection) +{ + MultiSelection ms(m_selections); + ms.addSelection(selection); + setSelections(ms, true); +} + +void ViewManager::removeSelection(const Selection &selection) { MultiSelection ms(m_selections); @@ -274,12 +282,14 @@ } void -ViewManager::setSelections(const MultiSelection &ms) +ViewManager::setSelections(const MultiSelection &ms, bool quietly) { if (m_selections.getSelections() == ms.getSelections()) return; SetSelectionCommand *command = new SetSelectionCommand(this, ms); CommandHistory::getInstance()->addCommand(command); - emit selectionChangedByUser(); + if (!quietly) { + emit selectionChangedByUser(); + } } size_t