Merge pull request #970 from manongjohn/fix_browswer_adding_task_crash

Fix crash when adding to task list from browser
This commit is contained in:
manongjohn 2022-04-19 09:46:56 -04:00 committed by GitHub
commit cc9b960018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,6 +239,11 @@ void FileSelection::enableCommands() {
//------------------------------------------------------------------------
void FileSelection::addToBatchRenderList() {
if (!BatchesController::instance()->getTasksTree()) {
QAction *taskPopup = CommandManager::instance()->getAction(MI_OpenTasks);
taskPopup->trigger();
}
std::vector<TFilePath> files;
getSelectedFiles(files);
int i;
@ -251,6 +256,11 @@ void FileSelection::addToBatchRenderList() {
//------------------------------------------------------------------------
void FileSelection::addToBatchCleanupList() {
if (!BatchesController::instance()->getTasksTree()) {
QAction *taskPopup = CommandManager::instance()->getAction(MI_OpenTasks);
taskPopup->trigger();
}
std::vector<TFilePath> files;
getSelectedFiles(files);
int i;