From be833ad26c54776d4390f9c90629c1b8edf8f989 Mon Sep 17 00:00:00 2001 From: Johnny Sequeira Date: Tue, 16 Jul 2024 13:57:31 -0600 Subject: [PATCH] Adding regular function instead of Lambda function --- qfieldsync/gui/layers_config_widget.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qfieldsync/gui/layers_config_widget.py b/qfieldsync/gui/layers_config_widget.py index f502f265..1a3c2738 100644 --- a/qfieldsync/gui/layers_config_widget.py +++ b/qfieldsync/gui/layers_config_widget.py @@ -158,7 +158,7 @@ def reloadProject(self): if show_visible_only and not layer_visible: continue - if text_filter and text_filter not in layer_name: + if filter_text and filter_text not in layer_name: continue count = self.layersTable.rowCount() @@ -176,11 +176,10 @@ def reloadProject(self): ) # Save the current action for the layer - cmb.currentIndexChanged.connect( - lambda index, l_source=layer_source: self.set_layer_action( - l_source, cmb.itemData(index) - ) - ) + def on_current_index_changed(index, layer_source): + self.set_layer_action(layer_source, cmb.itemData(index)) + + cmb.currentIndexChanged.connect(on_current_index_changed) properties_btn = QPushButton() properties_btn.setText(self.tr("Properties"))