mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
add value changed signal for extent parameter widget wrapper
This commit is contained in:
parent
e90efda46d
commit
37f14f8b3f
@ -31,7 +31,7 @@ import warnings
|
||||
from qgis.PyQt import uic
|
||||
from qgis.PyQt.QtWidgets import QMenu, QAction, QInputDialog
|
||||
from qgis.PyQt.QtGui import QCursor
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.PyQt.QtCore import QCoreApplication, pyqtSignal
|
||||
|
||||
from qgis.gui import QgsMessageBar
|
||||
from qgis.utils import iface
|
||||
@ -56,10 +56,14 @@ with warnings.catch_warnings():
|
||||
|
||||
class ExtentSelectionPanel(BASE, WIDGET):
|
||||
|
||||
hasChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, dialog, param):
|
||||
super(ExtentSelectionPanel, self).__init__(None)
|
||||
self.setupUi(self)
|
||||
|
||||
self.leText.textChanged.connect(lambda: self.hasChanged.emit())
|
||||
|
||||
self.dialog = dialog
|
||||
self.param = param
|
||||
self.crs = QgsProject.instance().crs()
|
||||
|
@ -395,7 +395,9 @@ class ExtentWidgetWrapper(WidgetWrapper):
|
||||
|
||||
def createWidget(self):
|
||||
if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH):
|
||||
return ExtentSelectionPanel(self.dialog, self.parameterDefinition())
|
||||
widget = ExtentSelectionPanel(self.dialog, self.parameterDefinition())
|
||||
widget.hasChanged.connect(lambda: self.widgetValueHasChanged.emit(self))
|
||||
return widget
|
||||
else:
|
||||
widget = QComboBox()
|
||||
widget.setEditable(True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user