Skip to content

Commit 3decab9

Browse files
committedNov 24, 2017
Fix map item tooltips
1 parent 63f14bd commit 3decab9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎src/core/layout/qgslayoutitemmap.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ void QgsLayoutItemMap::assignFreeId()
100100

101101
maxId = std::max( maxId, map->mMapId );
102102
}
103-
if ( !used )
104-
return;
105-
mMapId = maxId + 1;
106-
mLayout->itemsModel()->updateItemDisplayName( this );
103+
if ( used )
104+
{
105+
mMapId = maxId + 1;
106+
mLayout->itemsModel()->updateItemDisplayName( this );
107+
}
107108
updateToolTip();
108109
}
109110

@@ -1253,7 +1254,7 @@ void QgsLayoutItemMap::connectUpdateSlot()
12531254

12541255
void QgsLayoutItemMap::updateToolTip()
12551256
{
1256-
setToolTip( tr( "Map %1" ).arg( displayName() ) );
1257+
setToolTip( displayName() );
12571258
}
12581259

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

0 commit comments

Comments
 (0)
Please sign in to comment.