Skip to content

Commit

Permalink
added clear_field_layout, needs more testing
Browse files Browse the repository at this point in the history
disabled fields_layout for now, needs more testing
  • Loading branch information
bogind committed Oct 10, 2021
1 parent cf02a27 commit 9d43c5e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions qlyrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,15 @@ def parseLabels(self, labelSymbArr, labelExpArr, layer, layerId = 0):

return label_settings


def clear_field_layout(self):
fields_layout = self.dlg.field_selection
for n in range(0,fields_layout.count()):
fields_layout.removeItem(fields_layout.itemAt(n))


def add_field_layout(self,layer,field_name,index):
self.clear_field_layout()
fields_layout = self.dlg.field_selection
span = QHBoxLayout()
#span.setObjectName("span_{}+{}".format(str(field_name)+str(index+1)))
Expand Down Expand Up @@ -1234,8 +1242,8 @@ def initial_lyrx_parse(self,lyrx_data,layer):
field_exist = layer.fields().indexFromName(renderers[z]['fields'][0])
if field_exist > -1:
rend_idx = z
for u in range(0,len(self.used_fields)):
self.add_field_layout(layer,self.used_fields[u],u)
#for u in range(0,len(self.used_fields)):
#self.add_field_layout(layer,self.used_fields[u],u)


def apply_lyrx_symbols(self, layer, lyrx_data, geometry_general_type_str):
Expand Down

0 comments on commit 9d43c5e

Please sign in to comment.