mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-31 09:14:11 -05:00
Refactors selection handling for improved code clarity
Modernize the interface to selection system. Create and return data instead of populating incoming parameters.
This commit is contained in:
1 parent
380f559f0d
commit
ae8446073b
136 files changed
+357
-870
No files matched your search
+2
-8
@@ -67,10 +67,7 @@ void RicCopyReferencesToClipboardFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
std::vector<QString> referenceList;
|
||||
|
||||
std::vector<caf::PdmObject*> selectedFormationNamesCollObjs;
|
||||
caf::SelectionManager::instance()->objectsByType( &selectedFormationNamesCollObjs );
|
||||
|
||||
for ( caf::PdmObject* pdmObject : selectedFormationNamesCollObjs )
|
||||
for ( caf::PdmObject* pdmObject : caf::SelectionManager::instance()->objectsByType<caf::PdmObject>() )
|
||||
{
|
||||
if ( RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported( pdmObject ) )
|
||||
{
|
||||
@@ -106,10 +103,7 @@ void RicCopyReferencesToClipboardFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected()
|
||||
{
|
||||
std::vector<caf::PdmObject*> selectedFormationNamesCollObjs;
|
||||
caf::SelectionManager::instance()->objectsByType( &selectedFormationNamesCollObjs );
|
||||
|
||||
for ( caf::PdmObject* pdmObject : selectedFormationNamesCollObjs )
|
||||
for ( caf::PdmObject* pdmObject : caf::SelectionManager::instance()->objectsByType<caf::PdmObject>() )
|
||||
{
|
||||
if ( RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported( pdmObject ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user