Skip to content

Commit

Permalink
don't show and raise identify results if attribute form pops up
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 13, 2014
1 parent ad08a28 commit 406fab2
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/app/qgsidentifyresultsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ void QgsIdentifyResultsDialog::show()
// column width is now stored in settings
//expandColumnsToFit();

bool showFeatureForm = false;

if ( lstResults->topLevelItemCount() > 0 )
{
QTreeWidgetItem *layItem = lstResults->topLevelItem( 0 );
Expand All @@ -843,8 +845,8 @@ void QgsIdentifyResultsDialog::show()
if ( layer )
{
// if this is the only feature and it's on a vector layer
// don't show the form dialog instead of the results window
featureForm();
// show the form dialog instead of the results window
showFeatureForm = true;
}
}
}
Expand All @@ -862,8 +864,19 @@ void QgsIdentifyResultsDialog::show()

QDialog::show();

mDock->show();
mDock->raise();
// when the feature form is opened don't show and raise the identify result.
// If it's not docked, the results would open after or possibly on top of the
// feature form and stay open (on top the canvas) after the feature form is
// closed.
if ( showFeatureForm )
{
featureForm();
}
else
{
mDock->show();
mDock->raise();
}
}

void QgsIdentifyResultsDialog::itemClicked( QTreeWidgetItem *item, int column )
Expand Down

0 comments on commit 406fab2

Please sign in to comment.