Skip to content
Permalink
Browse files

Merge pull request #2625 from SebDieBln/FixAppendingNotSupported

Fix accumulating "Not supported" hints
  • Loading branch information
nyalldawson committed Jan 1, 2016
2 parents 5a42728 + 9cd1edf commit 0df4cbe3c4b0f1942c556c1b3bc28fe9128a1838
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/app/qgsvectorlayerproperties.cpp
@@ -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

0 comments on commit 0df4cbe

Please sign in to comment.
You can’t perform that action at this time.