diff --git a/CHANGELOG.md b/CHANGELOG.md index bc24fb08..c327e589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,9 @@ RELEASING: 13. Upload the package to https://plugins.qgis.org/plugins/ORStools/ (Manage > Add Version) 14. Create new release in GitHub with tag version and release title of `vX.X.X` --> +## Unreleased +### Added +- Add shortcut to apply route calculation with ctrl+return ## [2.1.0] - 2025-12-09 diff --git a/ORStools/gui/ORStoolsDialog.py b/ORStools/gui/ORStoolsDialog.py index 26816fd5..8a98f2dc 100644 --- a/ORStools/gui/ORStoolsDialog.py +++ b/ORStools/gui/ORStoolsDialog.py @@ -64,8 +64,16 @@ QgisInterface, ) from qgis.PyQt.QtCore import QSizeF, QPointF, QCoreApplication -from qgis.PyQt.QtGui import QTextDocument -from qgis.PyQt.QtWidgets import QAction, QDialog, QApplication, QMenu, QMessageBox, QDialogButtonBox +from qgis.PyQt.QtGui import QTextDocument, QKeySequence +from qgis.PyQt.QtWidgets import ( + QAction, + QDialog, + QApplication, + QMenu, + QMessageBox, + QDialogButtonBox, + QShortcut, +) from qgis.PyQt.QtGui import QColor from qgis.PyQt.QtWidgets import ( QWidget, @@ -393,6 +401,8 @@ def __init__(self, iface: QgisInterface, parent=None) -> None: self.pushButton_export.clicked.connect( lambda: processing.execAlgorithmDialog(f"{PLUGIN_NAME}:export_network_from_map") ) + shortcut = QShortcut(QKeySequence("Ctrl+Return"), self) + shortcut.activated.connect(lambda: self.global_buttons.accepted.emit()) # Reset index of list items every time something is moved or deleted self.routing_fromline_list.model().rowsMoved.connect(self._reindex_list_items)