mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-11 00:04:27 -04:00
Do not emit changed signal if the value has not really changed
NULL case
This commit is contained in:
parent
e1de2e0c13
commit
8d41253f5d
@ -62,7 +62,11 @@ void QgsDateTimeEdit::clear()
|
||||
{
|
||||
displayNull();
|
||||
|
||||
changed( QDateTime() );
|
||||
// Check if it's really changed or crash, see GH #29937
|
||||
if ( ! dateTime().isNull() )
|
||||
{
|
||||
changed( QDateTime() );
|
||||
}
|
||||
|
||||
// emit signal of QDateTime::dateTimeChanged with an invalid date
|
||||
// anyway, using parent's signal should be avoided
|
||||
@ -252,6 +256,7 @@ void QgsDateTimeEdit::setDateTime( const QDateTime &dateTime )
|
||||
{
|
||||
clear();
|
||||
}
|
||||
// Check if it's really changed or crash, see GH #29937
|
||||
else if ( dateTime != QgsDateTimeEdit::dateTime() )
|
||||
{
|
||||
QDateTimeEdit::setDateTime( dateTime );
|
||||
|
Loading…
x
Reference in New Issue
Block a user