Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #450 from 3nids/showEditForm
Do not wait for feature form closing for non-editable layers
  • Loading branch information
NathanW2 committed Apr 3, 2013
2 parents 87572f7 + 7a1b12f commit 95d7ec3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/qgisappinterface.cpp
Expand Up @@ -531,7 +531,14 @@ bool QgisAppInterface::openFeatureForm( QgsVectorLayer *vlayer, QgsFeature &f, b
return false;

QgsFeatureAction action( tr( "Attributes changed" ), f, vlayer, -1, -1, QgisApp::instance() );
return action.editFeature();
if (vlayer->isEditable())
{
return action.editFeature();
}
else
{
return action.viewFeatureForm();
}
}

QDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeature &f )
Expand Down

0 comments on commit 95d7ec3

Please sign in to comment.