1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00

InstallDialog: Fix install dialog not calculating available space

After the PathEdit change that stopped it from emitting the
textChanged signal when instatiated, the available space
calculation wouldn't take place, so do it when the dialog
becomes visible.
This commit is contained in:
loathingKernel 2023-09-20 01:30:40 +03:00
parent ef07243677
commit c05209578c
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD

View file

@ -5,7 +5,7 @@ from typing import Tuple, List, Union, Optional
from PyQt5.QtCore import Qt, QThreadPool, QSettings, QCoreApplication
from PyQt5.QtCore import pyqtSignal, pyqtSlot
from PyQt5.QtGui import QCloseEvent, QKeyEvent
from PyQt5.QtGui import QCloseEvent, QKeyEvent, QShowEvent
from PyQt5.QtWidgets import QDialog, QFileDialog, QCheckBox, QLayout, QWidget, QVBoxLayout
from legendary.utils.selective_dl import get_sdl_appname
@ -172,6 +172,10 @@ class InstallDialog(QDialog):
self.ui.install_dialog_layout.setSizeConstraint(QLayout.SetFixedSize)
def showEvent(self, a0: QShowEvent) -> None:
self.save_install_edit(self.install_dir_edit.text())
super().showEvent(a0)
def execute(self):
if self.options.silent:
self.reject_close = False