Do not wait for feature form closing for non-editable layers

use viewFeatureForm instead of editFeature if layer is non editable