|
2 | 2 |
|
3 | 3 | import os |
4 | 4 |
|
5 | | -from PyQt5.QtWidgets import QMessageBox, QWidget |
6 | 5 | from qgis.core import QgsProject, QgsVectorFileWriter |
7 | 6 | from qgis.PyQt import uic |
| 7 | +from qgis.PyQt.QtWidgets import QMessageBox, QWidget |
8 | 8 |
|
9 | 9 | from ...main.helpers import ColumnMatcher, get_layer_names |
10 | 10 | from ...main.m2l_api import extract_basal_contacts |
@@ -277,11 +277,11 @@ def set_parameters(self, params): |
277 | 277 | params : dict |
278 | 278 | Dictionary of parameters to set. |
279 | 279 | """ |
280 | | - if 'geology_layer' in params and params['geology_layer']: |
| 280 | + if params.get('geology_layer'): |
281 | 281 | self.geologyLayerComboBox.setLayer(params['geology_layer']) |
282 | | - if 'faults_layer' in params and params['faults_layer']: |
| 282 | + if params.get('faults_layer'): |
283 | 283 | self.faultsLayerComboBox.setLayer(params['faults_layer']) |
284 | | - if 'ignore_units' in params and params['ignore_units']: |
| 284 | + if params.get('ignore_units'): |
285 | 285 | self.ignoreUnitsLineEdit.setText(', '.join(params['ignore_units'])) |
286 | 286 | if 'all_contacts' in params: |
287 | 287 | self.allContactsCheckBox.setChecked(params['all_contacts']) |
@@ -310,7 +310,7 @@ def _is_null_like(v): |
310 | 310 | if v is None: |
311 | 311 | return True |
312 | 312 | # PyQGIS QVariant null check |
313 | | - if hasattr(v, "isNull") and callable(getattr(v, "isNull")) and v.isNull(): |
| 313 | + if hasattr(v, "isNull") and callable(v.isNull) and v.isNull(): |
314 | 314 | return True |
315 | 315 | # Empty strings or literal "NULL" (case-insensitive) |
316 | 316 | if isinstance(v, str): |
|
0 commit comments