Skip to content
Permalink
Browse files

Auto set algorithm linked to newly created QgsProcessingAlgorithmConf…

…igurationWidget instances
  • Loading branch information
nyalldawson committed Feb 19, 2019
1 parent eb335c3 commit 69c703141e1491647601920c47bcb8f969fb0937
Showing with 5 additions and 2 deletions.
  1. +4 −1 src/gui/processing/qgsprocessingguiregistry.cpp
  2. +1 −1 tests/src/gui/testprocessinggui.cpp
@@ -66,7 +66,10 @@ QgsProcessingAlgorithmConfigurationWidget *QgsProcessingGuiRegistry::algorithmCo
{
if ( factory->canCreateFor( algorithm ) )
{
return factory->create( algorithm );
std::unique_ptr< QgsProcessingAlgorithmConfigurationWidget > widget( factory->create( algorithm ) );
if ( widget )
widget->setAlgorithm( algorithm );
return widget.release();
}
}

@@ -254,9 +254,9 @@ void TestProcessingGui::testSetGetConfig()
for ( const QgsProcessingAlgorithm *algorithm : algorithms )
{
std::unique_ptr<QgsProcessingAlgorithmConfigurationWidget> configWidget( QgsGui::instance()->processingGuiRegistry()->algorithmConfigurationWidget( algorithm ) );

if ( configWidget )
{
QCOMPARE( configWidget->algorithm(), algorithm );
const QVariantMap defaultConfig = configWidget->configuration();
configWidget->setConfiguration( defaultConfig );
const QVariantMap defaultControlConfig = configWidget->configuration();

0 comments on commit 69c7031

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