Showing with 8 additions and 1 deletion.
  1. +8 −1 src/app/qgisappinterface.cpp
9 changes: 8 additions & 1 deletion src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
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