Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pupgui2: Don't attempt to map install_directory if combo_install_location_index_map is empty #458

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pupgui2/pupgui2.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,17 @@ def btn_close_clicked(self):
self.cancel_download(cancel_all=True)
self.ui.close()

def combo_install_location_current_index_changed(self):
def combo_install_location_current_index_changed(self) -> None:
if len(self.combo_install_location_index_map) <= 0:
self.update_ui()

return

if not self.updating_combo_install_location:
install_dir = install_directory(self.combo_install_location_index_map[self.ui.comboInstallLocation.currentIndex()])
self.ui.statusBar().showMessage(self.tr('Changed install directory to {install_dir}.').format(install_dir=install_dir), timeout=3000)
self.update_ui()

self.update_ui()

def btn_manage_install_locations_clicked(self):
customid_dialog = PupguiCustomInstallDirectoryDialog(install_directory(), parent=self.ui)
Expand Down