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 github-actions[bot] committed Oct 30, 2024
1 parent eb0295c commit be1d1c6
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 @@ -130,7 +130,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 @@ -160,16 +160,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 be1d1c6

Please sign in to comment.