Convert split and merge dialogs into class method dialogs
This commit is contained in:
@@ -28,14 +28,17 @@ import logging
|
||||
from PyQt5.QtCore import QSize, pyqtSlot
|
||||
from PyQt5.QtGui import QFontMetrics
|
||||
from PyQt5.QtWidgets import (
|
||||
QDialog, QDialogButtonBox, QFrame, QHBoxLayout, QLabel, QListWidget,
|
||||
QDialogButtonBox, QFrame, QHBoxLayout, QLabel, QListWidget,
|
||||
QListWidgetItem, QVBoxLayout, QWidget
|
||||
)
|
||||
|
||||
from novelwriter import CONFIG
|
||||
from novelwriter.constants import nwQuotes, trConst
|
||||
from novelwriter.extensions.modified import NDialog
|
||||
from novelwriter.types import QtAlignCenter, QtAlignTop, QtDialogCancel, QtDialogOk, QtUserRole
|
||||
from novelwriter.types import (
|
||||
QtAccepted, QtAlignCenter, QtAlignTop, QtDialogCancel, QtDialogOk,
|
||||
QtUserRole
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -127,7 +130,7 @@ class GuiQuoteSelect(NDialog):
|
||||
cls = GuiQuoteSelect(parent, current=current)
|
||||
cls.exec()
|
||||
quote = cls._selected
|
||||
accepted = cls.result() == QDialog.DialogCode.Accepted
|
||||
accepted = cls.result() == QtAccepted
|
||||
cls.deleteLater()
|
||||
return quote, accepted
|
||||
|
||||
|
||||
Reference in New Issue
Block a user