Skip to content

Commit

Permalink
fix missing icons in locator
Browse files Browse the repository at this point in the history
fixes #59243
  • Loading branch information
3nids authored and nyalldawson committed Oct 30, 2024
1 parent ab7f02a commit f0a7b63
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/core/locator/qgslocatormodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ QVariant QgsLocatorModel::data( const QModelIndex &index, int role ) const
switch ( static_cast<Column>( index.column() ) )
{
case Name:
if ( !entry.filter )
if ( entry.type == EntryType::Result )
{
const QIcon &icon = entry.result.icon;
if ( !icon.isNull() )
Expand Down Expand Up @@ -161,16 +161,10 @@ QVariant QgsLocatorModel::data( const QModelIndex &index, int role ) const
return ( entry.result.score );

case static_cast< int >( CustomRole::ResultFilterPriority ):
if ( !entry.filter )
return entry.result.filter->priority();
else
return entry.filter->priority();
return entry.filter->priority();

case static_cast< int >( CustomRole::ResultFilterName ):
if ( !entry.filter )
return entry.result.filter->displayName();
else
return entry.filterTitle;
return entry.filterTitle;

case static_cast< int >( CustomRole::ResultFilterGroupTitle ):
return entry.groupTitle;
Expand Down

0 comments on commit f0a7b63

Please sign in to comment.