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:
parent
ef07243677
commit
c05209578c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue