[QGIS Commit] r12130 - in trunk/qgis/src: app ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Nov 15 14:53:11 EST 2009
Author: jef
Date: 2009-11-15 14:53:10 -0500 (Sun, 15 Nov 2009)
New Revision: 12130
Modified:
trunk/qgis/src/app/qgsidentifyresults.cpp
trunk/qgis/src/app/qgsoptions.cpp
trunk/qgis/src/ui/qgsoptionsbase.ui
Log:
[FEATURE] add option to open the feature form, if a single feature is identified
Modified: trunk/qgis/src/app/qgsidentifyresults.cpp
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.cpp 2009-11-15 18:43:05 UTC (rev 12129)
+++ trunk/qgis/src/app/qgsidentifyresults.cpp 2009-11-15 19:53:10 UTC (rev 12130)
@@ -264,7 +264,7 @@
QTreeWidgetItem *layItem = lstResults->topLevelItem( 0 );
QTreeWidgetItem *featItem = layItem->child( 0 );
- if ( layItem->childCount() == 1 )
+ if ( layItem->childCount() == 1 && QSettings().value("/Map/identifyAutoFeatureForm", false).toBool() )
{
QgsVectorLayer *layer = qobject_cast<QgsVectorLayer *>( layItem->data( 0, Qt::UserRole ).value<QObject *>() );
if ( layer )
Modified: trunk/qgis/src/app/qgsoptions.cpp
===================================================================
--- trunk/qgis/src/app/qgsoptions.cpp 2009-11-15 18:43:05 UTC (rev 12129)
+++ trunk/qgis/src/app/qgsoptions.cpp 2009-11-15 19:53:10 UTC (rev 12130)
@@ -56,6 +56,7 @@
QSettings settings;
int identifyMode = settings.value( "/Map/identifyMode", 0 ).toInt();
cmbIdentifyMode->setCurrentIndex( cmbIdentifyMode->findData( identifyMode ) );
+ cbxAutoFeatureForm->setChecked( settings.value( "/Map/identifyAutoFeatureForm", false ).toBool() );
double identifyValue = settings.value( "/Map/identifyRadius", QGis::DEFAULT_IDENTIFY_RADIUS ).toDouble();
QgsDebugMsg( QString( "Standard Identify radius setting read from settings file: %1" ).arg( identifyValue ) );
spinBoxIdentifyValue->setValue( identifyValue );
@@ -392,6 +393,7 @@
//general settings
settings.setValue( "/Map/identifyMode", cmbIdentifyMode->itemData( cmbIdentifyMode->currentIndex() ).toInt() );
+ settings.setValue( "/Map/identifyAutoFeatureForm", cbxAutoFeatureForm->isChecked() );
settings.setValue( "/Map/identifyRadius", spinBoxIdentifyValue->value() );
settings.setValue( "/qgis/showLegendClassifiers", cbxLegendClassifiers->isChecked() );
settings.setValue( "/qgis/hideSplash", cbxHideSplash->isChecked() );
Modified: trunk/qgis/src/ui/qgsoptionsbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsoptionsbase.ui 2009-11-15 18:43:05 UTC (rev 12129)
+++ trunk/qgis/src/ui/qgsoptionsbase.ui 2009-11-15 19:53:10 UTC (rev 12130)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>733</width>
- <height>549</height>
+ <width>722</width>
+ <height>529</height>
</rect>
</property>
<property name="windowTitle">
@@ -23,7 +23,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>7</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
@@ -455,7 +455,7 @@
<property name="margin">
<number>11</number>
</property>
- <item row="2" column="0" colspan="2">
+ <item row="3" column="0" colspan="2">
<widget class="QLabel" name="textLabel2">
<property name="text">
<string><b>Note:</b> Specify the search radius as a percentage of the map width</string>
@@ -465,7 +465,7 @@
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="textLabel1_3">
<property name="text">
<string>Search radius for identifying features and displaying map tips</string>
@@ -475,7 +475,7 @@
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="QDoubleSpinBox" name="spinBoxIdentifyValue">
<property name="suffix">
<string>%</string>
@@ -504,6 +504,13 @@
</property>
</widget>
</item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QCheckBox" name="cbxAutoFeatureForm">
+ <property name="text">
+ <string>Open feature form, if a single feature is identified</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
More information about the QGIS-commit
mailing list