@@ -780,12 +780,13 @@ bool QgsAttributeForm::currentFormFeature( QgsFeature &feature )
780
780
781
781
void QgsAttributeForm::clearInvalidConstraintsMessage ()
782
782
{
783
+ mInvalidConstraintMessage ->hide ();
783
784
mInvalidConstraintMessage ->clear ();
784
785
mInvalidConstraintMessage ->setStyleSheet ( QString () );
785
786
}
786
787
787
- void QgsAttributeForm::displayInvalidConstraintMessage ( const QStringList & f,
788
- const QStringList & d )
788
+ void QgsAttributeForm::displayInvalidConstraintMessage ( const QStringList& f,
789
+ const QStringList& d )
789
790
{
790
791
clearInvalidConstraintsMessage ();
791
792
@@ -801,6 +802,7 @@ void QgsAttributeForm::displayInvalidConstraintMessage( const QStringList &f,
801
802
QString title = QString ( " <img src=\" %1\" > <b>%2:" ).arg ( icPath ).arg ( tr ( " Invalid fields" ) );
802
803
QString msg = QString ( " %1</b><ul>%2</ul>" ).arg ( title ).arg ( descriptions ) ;
803
804
805
+ mInvalidConstraintMessage ->show ();
804
806
mInvalidConstraintMessage ->setText ( msg );
805
807
mInvalidConstraintMessage ->setStyleSheet ( " QLabel { background-color : #ffc800; }" );
806
808
}
@@ -919,8 +921,8 @@ void QgsAttributeForm::onConstraintStatusChanged( const QString& constraint,
919
921
}
920
922
}
921
923
922
- void QgsAttributeForm::constraintDependencies ( QgsEditorWidgetWrapper * w,
923
- QList<QgsEditorWidgetWrapper*> & wDeps )
924
+ void QgsAttributeForm::constraintDependencies ( QgsEditorWidgetWrapper* w,
925
+ QList<QgsEditorWidgetWrapper*>& wDeps )
924
926
{
925
927
QString name = w->field ().name ();
926
928
@@ -1048,6 +1050,7 @@ void QgsAttributeForm::init()
1048
1050
vl->addWidget ( mMessageBar );
1049
1051
1050
1052
mInvalidConstraintMessage = new QLabel ( this );
1053
+ mInvalidConstraintMessage ->hide ();
1051
1054
vl->addWidget ( mInvalidConstraintMessage );
1052
1055
1053
1056
setLayout ( vl );
0 commit comments