ui,popups: fixed adding rules when there's no path

Fixed creating rules when there's no path nor cmdline reported (with [x]
Debug invalid connections).
This commit is contained in:
Gustavo Iñiguez Goia 2023-12-06 12:57:59 +01:00
parent 17c8ec8484
commit 250dcb1f6d
Failed to generate hash of commit

View file

@ -419,7 +419,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
self._default_action = self._cfg.getInt(self._cfg.DEFAULT_ACTION_KEY)
_utils.set_default_duration(self._cfg, self.durationCombo)
if int(con.process_id) > 0:
if int(con.process_id) > 0 and app_name != "" and app_args != "":
self.whatCombo.setCurrentIndex(int(self._cfg.getSettings(self._cfg.DEFAULT_TARGET_KEY)))
else:
self.whatCombo.setCurrentIndex(2)