Skip to content
Permalink
Browse files
[FEATURE] add option to open the feature form, if a single feature is…
… identified

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12130 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 15, 2009
1 parent 3a0a819 commit e77ea968ed6638f6f91398526797e44f47accc21
Showing with 16 additions and 7 deletions.
  1. +1 −1 src/app/qgsidentifyresults.cpp
  2. +2 −0 src/app/qgsoptions.cpp
  3. +13 −6 src/ui/qgsoptionsbase.ui
@@ -264,7 +264,7 @@ void QgsIdentifyResults::show()
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 )
@@ -56,6 +56,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
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 @@ void QgsOptions::saveOptions()

//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() );
@@ -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>&lt;b&gt;Note:&lt;/b&gt; 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>

0 comments on commit e77ea96

Please sign in to comment.