@@ -50,7 +50,6 @@ int QgsAttributeForm::sFormCounter = 0;
50
50
QgsAttributeForm::QgsAttributeForm ( QgsVectorLayer* vl, const QgsFeature &feature, const QgsAttributeEditorContext &context, QWidget* parent )
51
51
: QWidget( parent )
52
52
, mInvalidConstraintMessageBarItem( nullptr )
53
- , mFieldNotInitializedMessageBarItem( nullptr )
54
53
, mLayer( vl )
55
54
, mMessageBar( nullptr )
56
55
, mMultiEditUnsavedMessageBarItem( nullptr )
@@ -83,7 +82,6 @@ QgsAttributeForm::QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature &featur
83
82
connect ( vl, SIGNAL ( selectionChanged () ), this , SLOT ( layerSelectionChanged () ) );
84
83
85
84
// constraints management
86
- displayNullFieldsMessage ();
87
85
updateAllConstaints ();
88
86
}
89
87
@@ -762,30 +760,6 @@ bool QgsAttributeForm::currentFormFeature( QgsFeature &feature )
762
760
return rc;
763
761
}
764
762
765
- void QgsAttributeForm::displayNullFieldsMessage ()
766
- {
767
- QStringList notInitializedFields;
768
- Q_FOREACH ( QgsWidgetWrapper* ww, mWidgets )
769
- {
770
- QgsEditorWidgetWrapper* eww = qobject_cast<QgsEditorWidgetWrapper*>( ww );
771
- if ( eww )
772
- {
773
- if ( mFeature .attribute ( eww->fieldIdx () ).isNull () )
774
- notInitializedFields.append ( eww->field ().name () );
775
- }
776
- }
777
-
778
- if ( ! notInitializedFields.isEmpty () )
779
- {
780
- mFieldNotInitializedMessageBarItem =
781
- new QgsMessageBarItem ( tr ( " Some fields are NULL: " ),
782
- notInitializedFields.join ( " , " ),
783
- QgsMessageBar::INFO );
784
- mMessageBar ->pushItem ( mFieldNotInitializedMessageBarItem );
785
- }
786
-
787
- }
788
-
789
763
void QgsAttributeForm::clearInvalidConstraintsMessage ()
790
764
{
791
765
if ( mInvalidConstraintMessageBarItem != nullptr )
0 commit comments