Fix form constraints and group visibility

When a relation editor was shown (or more generally a widget which is not an
editor widget), constraints and group visibility were silently disabled.
This commit is contained in:
Matthias Kuhn 2016-10-18 10:38:08 +02:00
parent 04e3796610
commit d5d3eeee35

View File

@ -754,7 +754,11 @@ bool QgsAttributeForm::currentFormFeature( QgsFeature &feature )
Q_FOREACH ( QgsWidgetWrapper* ww, mWidgets )
{
QgsEditorWidgetWrapper* eww = qobject_cast<QgsEditorWidgetWrapper*>( ww );
if ( eww && dst.count() > eww->fieldIdx() )
if ( !eww )
continue;
if ( dst.count() > eww->fieldIdx() )
{
QVariant dstVar = dst.at( eww->fieldIdx() );
QVariant srcVar = eww->value();