Skip to content

Commit

Permalink
Fix form constraints and group visibility
Browse files Browse the repository at this point in the history
When a relation editor was shown (or more generally a widget which is not an
editor widget), constraints and group visibility were silently disabled.
  • Loading branch information
m-kuhn committed Oct 18, 2016
1 parent 4ba3290 commit 1700aa1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/qgsattributeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,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();
Expand Down

0 comments on commit 1700aa1

Please sign in to comment.