Skip to content

Commit

Permalink
always use identify dialog as dock (also fixes #9631)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Apr 21, 2014
1 parent 46ce006 commit f26b539
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
18 changes: 7 additions & 11 deletions src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -272,14 +272,11 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge

QSettings mySettings;
restoreGeometry( mySettings.value( "/Windows/Identify/geometry" ).toByteArray() );
bool myDockFlag = mySettings.value( "/qgis/dockIdentifyResults", false ).toBool();
if ( myDockFlag )
{
mDock = new QgsIdentifyResultsDock( tr( "Identify Results" ) , QgisApp::instance() );
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mDock->setWidget( this );
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );
}
mDock = new QgsIdentifyResultsDock( tr( "Identify Results" ) , QgisApp::instance() );
mDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
mDock->setWidget( this );
QgisApp::instance()->addDockWidget( Qt::LeftDockWidgetArea, mDock );

mExpandNewToolButton->setChecked( mySettings.value( "/Map/identifyExpand", false ).toBool() );
mCopyToolButton->setEnabled( false );
lstResults->setColumnCount( 2 );
Expand Down Expand Up @@ -666,7 +663,6 @@ void QgsIdentifyResultsDialog::show()
// don't show the form dialog instead of the results window
lstResults->setCurrentItem( featItem );
featureForm();
return;
}
}

Expand Down Expand Up @@ -696,8 +692,8 @@ void QgsIdentifyResultsDialog::close()

saveWindowLocation();
done( 0 );
if ( mDock )
mDock->close();

mDock->close();
}

// Save the current window size/position before closing
Expand Down
11 changes: 1 addition & 10 deletions src/app/qgsmaptoolidentifyaction.cpp
Expand Up @@ -113,16 +113,7 @@ void QgsMapToolIdentifyAction::canvasReleaseEvent( QMouseEvent *e )
}
else
{
QSettings mySettings;
bool myDockFlag = mySettings.value( "/qgis/dockIdentifyResults", false ).toBool();
if ( !myDockFlag )
{
resultsDialog()->hide();
}
else
{
resultsDialog()->clear();
}
resultsDialog()->clear();
QgisApp::instance()->statusBar()->showMessage( tr( "No features at this position found." ) );
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsoptions.cpp
Expand Up @@ -576,7 +576,6 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
cbxHideSplash->setChecked( settings.value( "/qgis/hideSplash", false ).toBool() );
cbxShowTips->setChecked( settings.value( "/qgis/showTips", true ).toBool() );
cbxAttributeTableDocked->setChecked( settings.value( "/qgis/dockAttributeTable", false ).toBool() );
cbxIdentifyResultsDocked->setChecked( settings.value( "/qgis/dockIdentifyResults", false ).toBool() );
cbxSnappingOptionsDocked->setChecked( settings.value( "/qgis/dockSnapping", false ).toBool() );
cbxAddPostgisDC->setChecked( settings.value( "/qgis/addPostgisDC", false ).toBool() );
cbxAddOracleDC->setChecked( settings.value( "/qgis/addOracleDC", false ).toBool() );
Expand Down Expand Up @@ -1068,7 +1067,6 @@ void QgsOptions::saveOptions()
settings.setValue( "/qgis/scanZipInBrowser2",
cmbScanZipInBrowser->itemData( cmbScanZipInBrowser->currentIndex() ).toString() );
settings.setValue( "/qgis/ignoreShapeEncoding", cbxIgnoreShapeEncoding->isChecked() );
settings.setValue( "/qgis/dockIdentifyResults", cbxIdentifyResultsDocked->isChecked() );
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() );
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() );
settings.setValue( "/qgis/addOracleDC", cbxAddOracleDC->isChecked() );
Expand Down

0 comments on commit f26b539

Please sign in to comment.