Skip to content

Commit f0a7b63

Browse files
3nidsnyalldawson
authored andcommitted
fix missing icons in locator
fixes qgis#59243
1 parent ab7f02a commit f0a7b63

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/core/locator/qgslocatormodel.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ QVariant QgsLocatorModel::data( const QModelIndex &index, int role ) const
131131
switch ( static_cast<Column>( index.column() ) )
132132
{
133133
case Name:
134-
if ( !entry.filter )
134+
if ( entry.type == EntryType::Result )
135135
{
136136
const QIcon &icon = entry.result.icon;
137137
if ( !icon.isNull() )
@@ -161,16 +161,10 @@ QVariant QgsLocatorModel::data( const QModelIndex &index, int role ) const
161161
return ( entry.result.score );
162162

163163
case static_cast< int >( CustomRole::ResultFilterPriority ):
164-
if ( !entry.filter )
165-
return entry.result.filter->priority();
166-
else
167-
return entry.filter->priority();
164+
return entry.filter->priority();
168165

169166
case static_cast< int >( CustomRole::ResultFilterName ):
170-
if ( !entry.filter )
171-
return entry.result.filter->displayName();
172-
else
173-
return entry.filterTitle;
167+
return entry.filterTitle;
174168

175169
case static_cast< int >( CustomRole::ResultFilterGroupTitle ):
176170
return entry.groupTitle;

0 commit comments

Comments
 (0)