Convert split and merge dialogs into class method dialogs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user