@@ -1408,29 +1408,38 @@ void QgsVectorLayer::showLayerProperties()
1408
1408
qApp->setOverrideCursor (QCursor (Qt::WaitCursor));
1409
1409
1410
1410
1411
+ if (!m_propertiesDialog)
1412
+ {
1411
1413
#ifdef QGISDEBUG
1412
- std::cerr << " Creating new QgsVectorLayerProperties object\n " ;
1414
+ std::cerr << " Creating new QgsVectorLayerProperties object\n " ;
1413
1415
#endif
1414
- m_propertiesDialog = new QgsVectorLayerProperties (this );
1415
- // Make sure that the UI starts out with the correct display
1416
- // field value
1416
+ m_propertiesDialog = new QgsVectorLayerProperties (this );
1417
+ // Make sure that the UI starts out with the correct display
1418
+ // field value
1417
1419
#ifdef QGISDEBUG
1418
- std::cerr << " Setting display field in prop dialog\n " ;
1420
+ std::cerr << " Setting display field in prop dialog\n " ;
1419
1421
#endif
1420
- m_propertiesDialog->setDisplayField (displayField ());
1422
+ m_propertiesDialog->setDisplayField (displayField ());
1421
1423
1422
1424
#ifdef QGISDEBUG
1423
- std::cerr << " Resetting prop dialog\n " ;
1425
+ std::cerr << " Resetting prop dialog\n " ;
1424
1426
#endif
1425
- m_propertiesDialog->reset ();
1427
+ m_propertiesDialog->reset ();
1426
1428
#ifdef QGISDEBUG
1427
- std::cerr << " Raising prop dialog\n " ;
1429
+ std::cerr << " Raising prop dialog\n " ;
1428
1430
#endif
1429
- m_propertiesDialog->raise ();
1431
+ m_propertiesDialog->raise ();
1430
1432
#ifdef QGISDEBUG
1431
- std::cerr << " Showing prop dialog\n " ;
1433
+ std::cerr << " Showing prop dialog\n " ;
1432
1434
#endif
1433
- m_propertiesDialog->show ();
1435
+ m_propertiesDialog->show ();
1436
+ }
1437
+ else
1438
+ {
1439
+ m_propertiesDialog->show ();
1440
+ m_propertiesDialog->raise ();
1441
+ }
1442
+
1434
1443
// restore normal cursor
1435
1444
qApp->restoreOverrideCursor ();
1436
1445
}
0 commit comments