Skip to content

Commit d5d3eee

Browse files
committed
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.
1 parent 04e3796 commit d5d3eee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gui/qgsattributeform.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,11 @@ bool QgsAttributeForm::currentFormFeature( QgsFeature &feature )
754754
Q_FOREACH ( QgsWidgetWrapper* ww, mWidgets )
755755
{
756756
QgsEditorWidgetWrapper* eww = qobject_cast<QgsEditorWidgetWrapper*>( ww );
757-
if ( eww && dst.count() > eww->fieldIdx() )
757+
758+
if ( !eww )
759+
continue;
760+
761+
if ( dst.count() > eww->fieldIdx() )
758762
{
759763
QVariant dstVar = dst.at( eww->fieldIdx() );
760764
QVariant srcVar = eww->value();

0 commit comments

Comments
 (0)