Skip to content
Permalink
Browse files

[processing] Disable Parameters panel during algorithm execution (not…

… the whole tab)
  • Loading branch information
gacarrillor committed Mar 8, 2020
1 parent 0153dc8 commit 871a3c0e679331ed7c039135c8e73bf43559833c
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/gui/processing/qgsprocessingalgorithmdialogbase.cpp
@@ -581,7 +581,10 @@ void QgsProcessingAlgorithmDialogBase::resetGui()
mButtonRun->setEnabled( true );
mButtonChangeParameters->setEnabled( true );
mButtonClose->setEnabled( true );
mTabWidget->setTabEnabled( 0, true ); // Enable Parameters tab
if ( mMainWidget )
{
mMainWidget->setEnabled( true );
}
updateRunButtonVisibility();
resetAdditionalGui();
}
@@ -591,7 +594,7 @@ void QgsProcessingAlgorithmDialogBase::updateRunButtonVisibility()
// Activate run button if current tab is Parameters
bool runButtonVisible = mTabWidget->currentIndex() == 0;
mButtonRun->setVisible( runButtonVisible );
mButtonChangeParameters->setVisible( !runButtonVisible && mExecutedAnyResult );
mButtonChangeParameters->setVisible( !runButtonVisible && mExecutedAnyResult && mButtonChangeParameters->isEnabled() );
}

void QgsProcessingAlgorithmDialogBase::resetAdditionalGui()
@@ -603,7 +606,10 @@ void QgsProcessingAlgorithmDialogBase::blockControlsWhileRunning()
{
mButtonRun->setEnabled( false );
mButtonChangeParameters->setEnabled( false );
mTabWidget->setTabEnabled( 0, false ); // Disable Parameters tab
if ( mMainWidget )
{
mMainWidget->setEnabled( false );
}
blockAdditionalControlsWhileRunning();
}

0 comments on commit 871a3c0

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