Skip to content

Commit c49d371

Browse files
committed
feat: ctrl+return schortcut to apply
1 parent 9d904e9 commit c49d371

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ORStools/gui/ORStoolsDialog.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,16 @@
6464
QgisInterface,
6565
)
6666
from qgis.PyQt.QtCore import QSizeF, QPointF, QCoreApplication
67-
from qgis.PyQt.QtGui import QTextDocument
68-
from qgis.PyQt.QtWidgets import QAction, QDialog, QApplication, QMenu, QMessageBox, QDialogButtonBox
67+
from qgis.PyQt.QtGui import QTextDocument, QKeySequence
68+
from qgis.PyQt.QtWidgets import (
69+
QAction,
70+
QDialog,
71+
QApplication,
72+
QMenu,
73+
QMessageBox,
74+
QDialogButtonBox,
75+
QShortcut,
76+
)
6977
from qgis.PyQt.QtGui import QColor
7078
from qgis.PyQt.QtWidgets import (
7179
QWidget,
@@ -393,6 +401,8 @@ def __init__(self, iface: QgisInterface, parent=None) -> None:
393401
self.pushButton_export.clicked.connect(
394402
lambda: processing.execAlgorithmDialog(f"{PLUGIN_NAME}:export_network_from_map")
395403
)
404+
shortcut = QShortcut(QKeySequence("Ctrl+Return"), self)
405+
shortcut.activated.connect(lambda: self.global_buttons.accepted.emit())
396406

397407
# Reset index of list items every time something is moved or deleted
398408
self.routing_fromline_list.model().rowsMoved.connect(self._reindex_list_items)

0 commit comments

Comments
 (0)