@@ -780,12 +780,13 @@ bool QgsAttributeForm::currentFormFeature( QgsFeature &feature )
780780
781781void QgsAttributeForm::clearInvalidConstraintsMessage ()
782782{
783+ mInvalidConstraintMessage ->hide ();
783784 mInvalidConstraintMessage ->clear ();
784785 mInvalidConstraintMessage ->setStyleSheet ( QString () );
785786}
786787
787- void QgsAttributeForm::displayInvalidConstraintMessage ( const QStringList & f,
788- const QStringList & d )
788+ void QgsAttributeForm::displayInvalidConstraintMessage ( const QStringList& f,
789+ const QStringList& d )
789790{
790791 clearInvalidConstraintsMessage ();
791792
@@ -801,6 +802,7 @@ void QgsAttributeForm::displayInvalidConstraintMessage( const QStringList &f,
801802 QString title = QString ( " <img src=\" %1\" > <b>%2:" ).arg ( icPath ).arg ( tr ( " Invalid fields" ) );
802803 QString msg = QString ( " %1</b><ul>%2</ul>" ).arg ( title ).arg ( descriptions ) ;
803804
805+ mInvalidConstraintMessage ->show ();
804806 mInvalidConstraintMessage ->setText ( msg );
805807 mInvalidConstraintMessage ->setStyleSheet ( " QLabel { background-color : #ffc800; }" );
806808}
@@ -919,8 +921,8 @@ void QgsAttributeForm::onConstraintStatusChanged( const QString& constraint,
919921 }
920922}
921923
922- void QgsAttributeForm::constraintDependencies ( QgsEditorWidgetWrapper * w,
923- QList<QgsEditorWidgetWrapper*> & wDeps )
924+ void QgsAttributeForm::constraintDependencies ( QgsEditorWidgetWrapper* w,
925+ QList<QgsEditorWidgetWrapper*>& wDeps )
924926{
925927 QString name = w->field ().name ();
926928
@@ -1048,6 +1050,7 @@ void QgsAttributeForm::init()
10481050 vl->addWidget ( mMessageBar );
10491051
10501052 mInvalidConstraintMessage = new QLabel ( this );
1053+ mInvalidConstraintMessage ->hide ();
10511054 vl->addWidget ( mInvalidConstraintMessage );
10521055
10531056 setLayout ( vl );
0 commit comments