Skip to content
Permalink
Browse files

always use identify dialog as dock (also fixes #9631)

  • Loading branch information
jef-n committed Apr 21, 2014
1 parent 46ce006 commit f26b539c996046b5e5502ecb8a9e85659f526a62
Showing with 8 additions and 23 deletions.
  1. +7 −11 src/app/qgsidentifyresultsdialog.cpp
  2. +1 −10 src/app/qgsmaptoolidentifyaction.cpp
  3. +0 −2 src/app/qgsoptions.cpp
@@ -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 );
@@ -666,7 +663,6 @@ void QgsIdentifyResultsDialog::show()
// don't show the form dialog instead of the results window
lstResults->setCurrentItem( featItem );
featureForm();
return;
}
}

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

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

mDock->close();
}

// Save the current window size/position before closing
@@ -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." ) );
}
}
@@ -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() );
@@ -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() );

0 comments on commit f26b539

Please sign in to comment.
You can’t perform that action at this time.