From 31b72d2879dc5d0df9b7b09bc65b6bb95e765960 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 17 Dec 2021 13:34:33 -0300 Subject: [PATCH] [view] improvement: not requesting confirmation for custom package actions that do not require it --- bauh/view/qt/apps_table.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bauh/view/qt/apps_table.py b/bauh/view/qt/apps_table.py index 712e61f4..76359d12 100644 --- a/bauh/view/qt/apps_table.py +++ b/bauh/view/qt/apps_table.py @@ -169,10 +169,10 @@ class PackagesTable(QTableWidget): else: body = '{} ?'.format(self.i18n[action.i18n_label_key]) - if ConfirmationDialog(icon=QIcon(pkg.model.get_type_icon_path()), - title=self.i18n[action.i18n_label_key], - body=self._parag(body), - i18n=self.i18n).ask(): + if not action.requires_confirmation or ConfirmationDialog(icon=QIcon(pkg.model.get_type_icon_path()), + title=self.i18n[action.i18n_label_key], + body=self._parag(body), + i18n=self.i18n).ask(): self.window.begin_execute_custom_action(pkg, action) return QCustomMenuAction(parent=parent,