mabuseif commited on
Commit
fb4989f
·
verified ·
1 Parent(s): f344d5e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -321,7 +321,7 @@ class BuildSustain:
321
  if key in st.session_state:
322
  st.session_state.pop(key, None)
323
 
324
- # Clear components-specific states when leaving the Building Components page
325
  if previous_page == "Building Components":
326
  keys_to_clear = [
327
  "walls_editor",
@@ -350,11 +350,11 @@ class BuildSustain:
350
  """
351
  # Check for any module-specific rerun requests
352
  for module_name, should_rerun in st.session_state.module_rerun_flags.items():
353
- if should_rer How to play:
354
- # Clear the flag and trigger rerun
355
- st.session_state.module_rerun_flags[module_name] = False
356
- st.rerun()
357
- break # Only handle one rerun at a time
358
 
359
  def display_page(self, page: str):
360
  """
 
321
  if key in st.session_state:
322
  st.session_state.pop(key, None)
323
 
324
+ # Clear component-specific states when leaving the Building Components page
325
  if previous_page == "Building Components":
326
  keys_to_clear = [
327
  "walls_editor",
 
350
  """
351
  # Check for any module-specific rerun requests
352
  for module_name, should_rerun in st.session_state.module_rerun_flags.items():
353
+ if should_rerun:
354
+ # Clear the flag and trigger rerun
355
+ st.session_state.module_rerun_flags[module_name] = False
356
+ st.rerun()
357
+ break # Only handle one rerun at a time
358
 
359
  def display_page(self, page: str):
360
  """