Skip to content

Commit 23024a5

Browse files
author
mhugent
committed
QgsAttributeDialog: disabled editing of items containing attribute names, added shortcuts for ok and cancel
git-svn-id: http://svn.osgeo.org/qgis/trunk@5316 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a6851a4 commit 23024a5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/gui/qgsattributedialog.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ QgsAttributeDialog::QgsAttributeDialog(const std::vector<QgsFeatureAttribute>* a
2929
for(std::vector<QgsFeatureAttribute>::const_iterator it=attributes->begin();it!=attributes->end();++it)
3030
{
3131
QTableWidgetItem * myFieldItem = new QTableWidgetItem((*it).fieldName());
32+
myFieldItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
3233
mTable->setItem(index, 0, myFieldItem);
3334
QTableWidgetItem * myValueItem = new QTableWidgetItem((*it).fieldValue());
3435
mTable->setItem(index, 1, myValueItem);

src/ui/qgsattributedialogbase.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
<item row="1" column="1" >
4848
<widget class="QPushButton" name="mOkButton" >
4949
<property name="text" >
50-
<string>OK</string>
50+
<string>&amp;OK</string>
5151
</property>
5252
</widget>
5353
</item>
5454
<item row="1" column="2" >
5555
<widget class="QPushButton" name="mCancelButton" >
5656
<property name="text" >
57-
<string>Cancel</string>
57+
<string>&amp;Cancel</string>
5858
</property>
5959
</widget>
6060
</item>

0 commit comments

Comments
 (0)