File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ QgsProcessingAlgorithmConfigurationWidget *QgsProcessingGuiRegistry::algorithmCo
6666 {
6767 if ( factory->canCreateFor ( algorithm ) )
6868 {
69- return factory->create ( algorithm );
69+ std::unique_ptr< QgsProcessingAlgorithmConfigurationWidget > widget ( factory->create ( algorithm ) );
70+ if ( widget )
71+ widget->setAlgorithm ( algorithm );
72+ return widget.release ();
7073 }
7174 }
7275
Original file line number Diff line number Diff line change @@ -254,9 +254,9 @@ void TestProcessingGui::testSetGetConfig()
254254 for ( const QgsProcessingAlgorithm *algorithm : algorithms )
255255 {
256256 std::unique_ptr<QgsProcessingAlgorithmConfigurationWidget> configWidget ( QgsGui::instance ()->processingGuiRegistry ()->algorithmConfigurationWidget ( algorithm ) );
257-
258257 if ( configWidget )
259258 {
259+ QCOMPARE ( configWidget->algorithm (), algorithm );
260260 const QVariantMap defaultConfig = configWidget->configuration ();
261261 configWidget->setConfiguration ( defaultConfig );
262262 const QVariantMap defaultControlConfig = configWidget->configuration ();
You can’t perform that action at this time.
0 commit comments