From 375d139854050ac38f30a8055daa9b0e1f8dfcef Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 2 Jun 2005 09:45:18 +0000 Subject: [PATCH] add an argument to selected() specifying a selector --- src/SUIT/SUIT_SelectionMgr.cxx | 4 +++- src/SUIT/SUIT_SelectionMgr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SUIT/SUIT_SelectionMgr.cxx b/src/SUIT/SUIT_SelectionMgr.cxx index 1089fb81a..b19694e89 100755 --- a/src/SUIT/SUIT_SelectionMgr.cxx +++ b/src/SUIT/SUIT_SelectionMgr.cxx @@ -47,13 +47,15 @@ void SUIT_SelectionMgr::setEnabled( const bool on, const QString& typ ) } } -void SUIT_SelectionMgr::selected( SUIT_DataOwnerPtrList& lst ) const +void SUIT_SelectionMgr::selected( SUIT_DataOwnerPtrList& lst, const QString& type ) const { lst.clear(); QMap map; for ( SelectorListIterator it( mySelectors ); it.current(); ++it ) { + if ( !type.isEmpty() && it.current()->type() != type ) + continue; SUIT_DataOwnerPtrList curList; it.current()->selected( curList ); for ( SUIT_DataOwnerPtrList::const_iterator itr = curList.begin(); itr != curList.end(); ++itr ) diff --git a/src/SUIT/SUIT_SelectionMgr.h b/src/SUIT/SUIT_SelectionMgr.h index 5f172c52e..bc1b66faa 100755 --- a/src/SUIT/SUIT_SelectionMgr.h +++ b/src/SUIT/SUIT_SelectionMgr.h @@ -18,7 +18,7 @@ public: virtual ~SUIT_SelectionMgr(); void clearSelected(); - virtual void selected( SUIT_DataOwnerPtrList& ) const; + virtual void selected( SUIT_DataOwnerPtrList&, const QString& = QString::null ) const; virtual void setSelected( const SUIT_DataOwnerPtrList&, const bool = false ); virtual void installSelector( SUIT_Selector* ); -- 2.39.2