mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #2625 from SebDieBln/FixAppendingNotSupported
Fix accumulating "Not supported" hints
This commit is contained in:
commit
0df4cbe3c4
@ -435,16 +435,24 @@ void QgsVectorLayerProperties::syncToLayer( void )
|
||||
mSimplifyDrawingGroupBox->setChecked( simplifyMethod.simplifyHints() != QgsVectorSimplifyMethod::NoSimplification );
|
||||
mSimplifyDrawingSpinBox->setValue( simplifyMethod.threshold() );
|
||||
|
||||
QString remark = QString( " (%1)" ).arg( tr( "Not supported" ) );
|
||||
if ( !( layer->dataProvider()->capabilities() & QgsVectorDataProvider::SimplifyGeometries ) )
|
||||
{
|
||||
mSimplifyDrawingAtProvider->setChecked( false );
|
||||
mSimplifyDrawingAtProvider->setEnabled( false );
|
||||
mSimplifyDrawingAtProvider->setText( QString( "%1 (%2)" ).arg( mSimplifyDrawingAtProvider->text(), tr( "Not supported" ) ) );
|
||||
if ( !mSimplifyDrawingAtProvider->text().endsWith( remark ) )
|
||||
mSimplifyDrawingAtProvider->setText( mSimplifyDrawingAtProvider->text().append( remark ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mSimplifyDrawingAtProvider->setChecked( !simplifyMethod.forceLocalOptimization() );
|
||||
mSimplifyDrawingAtProvider->setEnabled( mSimplifyDrawingGroupBox->isChecked() );
|
||||
if ( mSimplifyDrawingAtProvider->text().endsWith( remark ) )
|
||||
{
|
||||
QString newText = mSimplifyDrawingAtProvider->text();
|
||||
newText.chop( remark.size() );
|
||||
mSimplifyDrawingAtProvider->setText( newText );
|
||||
}
|
||||
}
|
||||
|
||||
// disable simplification for point layers, now it is not implemented
|
||||
|
Loading…
x
Reference in New Issue
Block a user