mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-02 20:07:59 +03:00
Fix add server via Gui crash
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -1093,14 +1093,26 @@ class UserServersQTableWidget(QTranslatable, AppQTableWidget):
|
||||
|
||||
logger.error(f'error while converting factory to input: {ex}')
|
||||
|
||||
def handleAccepted():
|
||||
guiEditor.inputToFactory(factory)
|
||||
|
||||
self.appendNewItemByFactory(factory)
|
||||
|
||||
guiEditor.connectAccepted(handleAccepted)
|
||||
guiEditor.accepted.connect(
|
||||
functools.partial(
|
||||
self.handleAddServerViaGui,
|
||||
guiEditor,
|
||||
factory,
|
||||
)
|
||||
)
|
||||
guiEditor.open()
|
||||
|
||||
def handleAddServerViaGui(
|
||||
self,
|
||||
editor: GuiEditorWidgetQDialog,
|
||||
factory: ConfigurationFactory,
|
||||
):
|
||||
editor.inputToFactory(factory)
|
||||
|
||||
self.appendNewItemByFactory(factory)
|
||||
|
||||
editor.accepted.disconnect()
|
||||
|
||||
def flushRow(self, row: int, item: ConfigurationFactory):
|
||||
for column in list(range(self.columnCount())):
|
||||
self.flushItem(row, column, item)
|
||||
|
||||
Reference in New Issue
Block a user