diff --git a/include/tool/selection.h b/include/tool/selection.h index 315f1f815a..f86f123972 100644 --- a/include/tool/selection.h +++ b/include/tool/selection.h @@ -154,11 +154,9 @@ public: template T* FirstOfKind() const { - auto refType = T( nullptr ).Type(); - for( auto item : m_items ) { - if( item->Type() == refType ) + if( IsA( item ) ) return static_cast ( item ); }