"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp" between
QGIS-final-3_10_11.tar.gz and QGIS-final-3_10_12.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgsvaluerelationwidgetwrapper.cpp  (QGIS-final-3_10_11):qgsvaluerelationwidgetwrapper.cpp  (QGIS-final-3_10_12)
skipping to change at line 244 skipping to change at line 244
if ( qgsVariantEqual( v, value ) ) if ( qgsVariantEqual( v, value ) )
{ {
idx = i; idx = i;
break; break;
} }
} }
mComboBox->setCurrentIndex( idx ); mComboBox->setCurrentIndex( idx );
} }
else if ( mLineEdit ) else if ( mLineEdit )
{ {
mLineEdit->clear();
bool wasFound { false };
for ( const QgsValueRelationFieldFormatter::ValueRelationItem &i : qgis::as_ const( mCache ) ) for ( const QgsValueRelationFieldFormatter::ValueRelationItem &i : qgis::as_ const( mCache ) )
{ {
if ( i.key == value ) if ( i.key == value )
{ {
mLineEdit->setText( i.value ); mLineEdit->setText( i.value );
wasFound = true;
break; break;
} }
} }
// Value could not be found
if ( ! wasFound )
{
mLineEdit->setText( tr( "(no selection)" ) );
}
} }
} }
void QgsValueRelationWidgetWrapper::widgetValueChanged( const QString &attribute , const QVariant &newValue, bool attributeChanged ) void QgsValueRelationWidgetWrapper::widgetValueChanged( const QString &attribute , const QVariant &newValue, bool attributeChanged )
{ {
// Do nothing if the value has not changed // Do nothing if the value has not changed
if ( attributeChanged ) if ( attributeChanged )
{ {
QVariant oldValue( value( ) ); QVariant oldValue( value( ) );
 End of changes. 3 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)