Skip to content

Commit

Permalink
[processing] Destroy widgets from an algorithm dialog as soon as it i…
Browse files Browse the repository at this point in the history
…s rejected
  • Loading branch information
gacarrillor authored and nyalldawson committed May 17, 2020
1 parent 576c2f3 commit 8a7feed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Expand Up @@ -182,6 +182,9 @@ Copies the current log contents to the clipboard.
Switches the dialog to the parameters page.
%End

virtual void reject();


protected:

virtual void closeEvent( QCloseEvent *e );
Expand Down
9 changes: 9 additions & 0 deletions src/gui/processing/qgsprocessingalgorithmdialogbase.cpp
Expand Up @@ -662,6 +662,15 @@ void QgsProcessingAlgorithmDialogBase::setInfo( const QString &message, bool isE
processEvents();
}

void QgsProcessingAlgorithmDialogBase::reject()
{
if ( !mAlgorithmTask )
{
setAttribute( Qt::WA_DeleteOnClose );
}
QDialog::reject();
}

//
// QgsProcessingAlgorithmProgressDialog
//
Expand Down
2 changes: 2 additions & 0 deletions src/gui/processing/qgsprocessingalgorithmdialogbase.h
Expand Up @@ -230,6 +230,8 @@ class GUI_EXPORT QgsProcessingAlgorithmDialogBase : public QDialog, public QgsPr
*/
void showParameters();

void reject() override;

protected:

void closeEvent( QCloseEvent *e ) override;
Expand Down

0 comments on commit 8a7feed

Please sign in to comment.