Skip to content

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/app/qgsmaptoolidentify.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ void QgsMapToolIdentify::identifyRasterLayer(QgsRasterLayer* layer, const QgsPoi
153153
mResults->addAttribute(it->first, it->second);
154154
}
155155

156+
mResults->addAttribute( tr("(clicked coordinate)"), point.stringRep() );
157+
156158
mResults->showAllAttributes();
157159
mResults->show();
158160
}
@@ -212,7 +214,7 @@ void QgsMapToolIdentify::identifyRasterWmsLayer(QgsRasterLayer* layer, const Qgs
212214

213215
QgsMessageViewer* viewer = new QgsMessageViewer();
214216
viewer->setCaption( layer->name() );
215-
viewer->setMessageAsPlainText( text );
217+
viewer->setMessageAsPlainText( QString(tr("WMS identify result for %1\n%2")).arg(point.stringRep()).arg(text) );
216218

217219
viewer->showMessage(); // deletes itself on close
218220
}
@@ -279,6 +281,9 @@ void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoi
279281

280282
int lastFeatureId = 0;
281283

284+
QTreeWidgetItem *click = mResults->addNode(tr("(clicked coordinate)"));
285+
click->setText(1, point.stringRep());
286+
282287
while (dataProvider->getNextFeature(feat))
283288
{
284289
featureCount++;

0 commit comments

Comments
 (0)
Please sign in to comment.