Skip to content

Commit f26b539

Browse files
committedApr 21, 2014
always use identify dialog as dock (also fixes #9631)
1 parent 46ce006 commit f26b539

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed
 

‎src/app/qgsidentifyresultsdialog.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,11 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge
272272

273273
QSettings mySettings;
274274
restoreGeometry( mySettings.value( "/Windows/Identify/geometry" ).toByteArray() );
275-
bool myDockFlag = mySettings.value( "/qgis/dockIdentifyResults", false ).toBool();
276-
if ( myDockFlag )
277-
{
278-
mDock = new QgsIdentifyResultsDock( tr( "Identify Results" ) , QgisApp::instance() );
279-
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
280-
mDock->setWidget( this );
281-
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );
282-
}
275+
mDock = new QgsIdentifyResultsDock( tr( "Identify Results" ) , QgisApp::instance() );
276+
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
277+
mDock->setWidget( this );
278+
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );
279+
283280
mExpandNewToolButton->setChecked( mySettings.value( "/Map/identifyExpand", false ).toBool() );
284281
mCopyToolButton->setEnabled( false );
285282
lstResults->setColumnCount( 2 );
@@ -666,7 +663,6 @@ void QgsIdentifyResultsDialog::show()
666663
// don't show the form dialog instead of the results window
667664
lstResults->setCurrentItem( featItem );
668665
featureForm();
669-
return;
670666
}
671667
}
672668

@@ -696,8 +692,8 @@ void QgsIdentifyResultsDialog::close()
696692

697693
saveWindowLocation();
698694
done( 0 );
699-
if ( mDock )
700-
mDock->close();
695+
696+
mDock->close();
701697
}
702698

703699
// Save the current window size/position before closing

‎src/app/qgsmaptoolidentifyaction.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,7 @@ void QgsMapToolIdentifyAction::canvasReleaseEvent( QMouseEvent *e )
113113
}
114114
else
115115
{
116-
QSettings mySettings;
117-
bool myDockFlag = mySettings.value( "/qgis/dockIdentifyResults", false ).toBool();
118-
if ( !myDockFlag )
119-
{
120-
resultsDialog()->hide();
121-
}
122-
else
123-
{
124-
resultsDialog()->clear();
125-
}
116+
resultsDialog()->clear();
126117
QgisApp::instance()->statusBar()->showMessage( tr( "No features at this position found." ) );
127118
}
128119
}

‎src/app/qgsoptions.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
576576
cbxHideSplash->setChecked( settings.value( "/qgis/hideSplash", false ).toBool() );
577577
cbxShowTips->setChecked( settings.value( "/qgis/showTips", true ).toBool() );
578578
cbxAttributeTableDocked->setChecked( settings.value( "/qgis/dockAttributeTable", false ).toBool() );
579-
cbxIdentifyResultsDocked->setChecked( settings.value( "/qgis/dockIdentifyResults", false ).toBool() );
580579
cbxSnappingOptionsDocked->setChecked( settings.value( "/qgis/dockSnapping", false ).toBool() );
581580
cbxAddPostgisDC->setChecked( settings.value( "/qgis/addPostgisDC", false ).toBool() );
582581
cbxAddOracleDC->setChecked( settings.value( "/qgis/addOracleDC", false ).toBool() );
@@ -1068,7 +1067,6 @@ void QgsOptions::saveOptions()
10681067
settings.setValue( "/qgis/scanZipInBrowser2",
10691068
cmbScanZipInBrowser->itemData( cmbScanZipInBrowser->currentIndex() ).toString() );
10701069
settings.setValue( "/qgis/ignoreShapeEncoding", cbxIgnoreShapeEncoding->isChecked() );
1071-
settings.setValue( "/qgis/dockIdentifyResults", cbxIdentifyResultsDocked->isChecked() );
10721070
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() );
10731071
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() );
10741072
settings.setValue( "/qgis/addOracleDC", cbxAddOracleDC->isChecked() );

0 commit comments

Comments
 (0)
Please sign in to comment.