Skip to content

Commit

Permalink
Fix UserControl _build() call (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeodorFitsner authored Jul 6, 2022
1 parent 2f53942 commit 34d85ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/python/flet/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ def build_update_commands(self, index, added_controls, commands, isolated=False)
for h in current_ints[b1:b2]:
# add
ctrl = hashes[h]
ctrl._build()
innerCmds = ctrl.get_cmd_str(
index=index, added_controls=added_controls
)
Expand All @@ -351,7 +350,6 @@ def build_update_commands(self, index, added_controls, commands, isolated=False)
# add
for h in current_ints[b1:b2]:
ctrl = hashes[h]
ctrl._build()
innerCmds = ctrl.get_cmd_str(
index=index, added_controls=added_controls
)
Expand Down Expand Up @@ -380,6 +378,8 @@ def _remove_control_recursively(self, index, control):
# private methods
def get_cmd_str(self, indent=0, index=None, added_controls=None):

self._build()

# remove control from index
if self.__uid and index != None and self.__uid in index:
del index[self.__uid]
Expand Down

0 comments on commit 34d85ba

Please sign in to comment.