Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix map item tooltips
  • Loading branch information
nyalldawson committed Nov 24, 2017
1 parent 63f14bd commit 3decab9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/layout/qgslayoutitemmap.cpp
Expand Up @@ -100,10 +100,11 @@ void QgsLayoutItemMap::assignFreeId()

maxId = std::max( maxId, map->mMapId );
}
if ( !used )
return;
mMapId = maxId + 1;
mLayout->itemsModel()->updateItemDisplayName( this );
if ( used )
{
mMapId = maxId + 1;
mLayout->itemsModel()->updateItemDisplayName( this );
}
updateToolTip();
}

Expand Down Expand Up @@ -1253,7 +1254,7 @@ void QgsLayoutItemMap::connectUpdateSlot()

void QgsLayoutItemMap::updateToolTip()
{
setToolTip( tr( "Map %1" ).arg( displayName() ) );
setToolTip( displayName() );
}

QList<QgsMapLayer *> QgsLayoutItemMap::layersToRender( const QgsExpressionContext *context ) const
Expand Down

0 comments on commit 3decab9

Please sign in to comment.