Skip to content

Commit ed4278c

Browse files
author
g_j_m
committedJan 28, 2006
When the vector project properties dialog box is requested, bring it to
the front if it already exists. git-svn-id: http://svn.osgeo.org/qgis/trunk@4767 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 40ebc71 commit ed4278c

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed
 

‎src/gui/qgsvectorlayer.cpp

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,29 +1408,38 @@ void QgsVectorLayer::showLayerProperties()
14081408
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
14091409

14101410

1411+
if (!m_propertiesDialog)
1412+
{
14111413
#ifdef QGISDEBUG
1412-
std::cerr << "Creating new QgsVectorLayerProperties object\n";
1414+
std::cerr << "Creating new QgsVectorLayerProperties object\n";
14131415
#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
14171419
#ifdef QGISDEBUG
1418-
std::cerr << "Setting display field in prop dialog\n";
1420+
std::cerr << "Setting display field in prop dialog\n";
14191421
#endif
1420-
m_propertiesDialog->setDisplayField(displayField());
1422+
m_propertiesDialog->setDisplayField(displayField());
14211423

14221424
#ifdef QGISDEBUG
1423-
std::cerr << "Resetting prop dialog\n";
1425+
std::cerr << "Resetting prop dialog\n";
14241426
#endif
1425-
m_propertiesDialog->reset();
1427+
m_propertiesDialog->reset();
14261428
#ifdef QGISDEBUG
1427-
std::cerr << "Raising prop dialog\n";
1429+
std::cerr << "Raising prop dialog\n";
14281430
#endif
1429-
m_propertiesDialog->raise();
1431+
m_propertiesDialog->raise();
14301432
#ifdef QGISDEBUG
1431-
std::cerr << "Showing prop dialog\n";
1433+
std::cerr << "Showing prop dialog\n";
14321434
#endif
1433-
m_propertiesDialog->show();
1435+
m_propertiesDialog->show();
1436+
}
1437+
else
1438+
{
1439+
m_propertiesDialog->show();
1440+
m_propertiesDialog->raise();
1441+
}
1442+
14341443
// restore normal cursor
14351444
qApp->restoreOverrideCursor();
14361445
}

0 commit comments

Comments
 (0)
Please sign in to comment.