lutraconsulting / serval

QGIS plugin for setting raster pixel values
42 stars 12 forks source link

Signals from map tools may arrive when spin boxes are not yet instantiated #15

Closed borysiasty closed 5 years ago

borysiasty commented 6 years ago

I've found it while testing the Reloader. After plugin reload, I got:

AttributeError: 'Serval' object has no attribute 'b1SBox' 
Traceback (most recent call last):
  File "/home/borys/.local/share/QGIS/QGIS3/profiles/default/python/plugins/serval-QGIS_3_port/serval.py", line 351, in point_clicked
    self.change_cell_value(new_vals)
  File "/home/borys/.local/share/QGIS/QGIS3/profiles/default/python/plugins/serval-QGIS_3_port/serval.py", line 389, in change_cell_value
    self.prepare_raster(True)
  File "/home/borys/.local/share/QGIS/QGIS3/profiles/default/python/plugins/serval-QGIS_3_port/serval.py", line 548, in prepare_raster
    sboxes = [self.b1SBox, self.b2SBox, self.b3SBox]
AttributeError: 'Serval' object has no attribute 'b1SBox'
erpas commented 5 years ago

Thanks Borys for reporting this! Fixed in master.