Convert split and merge dialogs into class method dialogs

This commit is contained in:
Veronica Berglyd Olsen
2024-05-27 23:36:17 +02:00
parent f7cdc7da0c
commit b33bf954bb
6 changed files with 51 additions and 60 deletions
+3 -6
View File
@@ -25,14 +25,11 @@ from __future__ import annotations
import logging
from PyQt5.QtWidgets import (
QDialog, QDialogButtonBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout,
QWidget
)
from PyQt5.QtWidgets import QDialogButtonBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout, QWidget
from novelwriter import CONFIG
from novelwriter.extensions.modified import NDialog
from novelwriter.types import QtDialogCancel, QtDialogOk
from novelwriter.types import QtAccepted, QtDialogCancel, QtDialogOk
logger = logging.getLogger(__name__)
@@ -92,6 +89,6 @@ class GuiEditLabel(NDialog):
cls = GuiEditLabel(parent, text=text)
cls.exec()
label = cls.itemLabel
accepted = cls.result() == QDialog.DialogCode.Accepted
accepted = cls.result() == QtAccepted
cls.deleteLater()
return label, accepted