fix textbox issues
This commit is contained in:
parent
2c4f02b293
commit
651448b6dd
3 changed files with 11 additions and 2 deletions
|
@ -660,6 +660,7 @@ class GUI(object):
|
|||
self.ui.dolTextBox.textChanged.connect(lambda: self.ui.set_edit_fields())
|
||||
self.ui.gctFolderTextBox.textChanged.connect(lambda: self.ui.set_edit_fields())
|
||||
self.ui.gctFileTextBox.textChanged.connect(lambda: self.ui.set_edit_fields())
|
||||
self.ui.destTextBox.textChanged.connect(lambda: self.ui.set_edit_fields())
|
||||
|
||||
self.ui.allocLineEdit.textChanged.connect(lambda: self._enforce_mask(self.ui.allocLineEdit, 0xFFFFFC))
|
||||
|
||||
|
@ -761,14 +762,14 @@ class GUI(object):
|
|||
with redirect_stdout(_outpipe), redirect_stderr(_errpipe):
|
||||
try:
|
||||
self.cli._exec(args, tmpdir=TMPDIR)
|
||||
except SystemExit:
|
||||
except (SystemExit, Exception):
|
||||
_status = False
|
||||
else:
|
||||
_status = True
|
||||
|
||||
if _status is False:
|
||||
_msg = f"Arguments failed! GeckoLoader couldn't execute the job\n\nArgs: {args.__repr__()}\n\nstderr: {self._remove_ansi(_errpipe.getvalue())}"
|
||||
self.ui.responses.appendPlainText(_msg.strip() + "\n")
|
||||
self.ui.responses.appendPlainText(_outpipe.getvalue() + "\n\n" + _msg.strip() + "\n")
|
||||
else:
|
||||
for line in self._remove_ansi(_outpipe.getvalue()).split("\n"):
|
||||
_msg += line.lstrip() + "\n"
|
||||
|
|
|
@ -435,6 +435,9 @@ class KernelLoader(object):
|
|||
|
||||
write_uint32(self._rawData, CodeHandler.encrypt_key(_key))
|
||||
|
||||
if _lowerAddr + gpModInfoOffset > 0xFFFF:
|
||||
_lowerAddr -= 0x10000
|
||||
|
||||
self._gpModDataList = (gpModUpperAddr, gpModInfoOffset)
|
||||
self._gpKeyAddrList = (gpKeyUpperAddr, gpKeyOffset)
|
||||
|
||||
|
|
|
@ -655,9 +655,14 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||
for item in attributes:
|
||||
item = getattr(self, item)
|
||||
if isinstance(item, QtWidgets.QLineEdit):
|
||||
strlength = len(item.text())
|
||||
cursorPos = item.cursorPosition()
|
||||
item.setText(item.text().lstrip())
|
||||
item.setCursorPosition(cursorPos - (strlength - len(item.text())))
|
||||
elif isinstance(item, QtWidgets.QPlainTextEdit):
|
||||
sliderPos = item.verticalScrollBar().sliderPosition()
|
||||
item.setPlainText(item.toPlainText().lstrip())
|
||||
item.verticalScrollBar().setSliderPosition(sliderPos)
|
||||
|
||||
def set_edit_fields(self):
|
||||
self.filesLabel.setEnabled(True)
|
||||
|
|
Reference in a new issue