Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -74,13 +74,8 @@ current_state = 'main_panel' # Variable to keep track of the current state
|
|
| 74 |
# Function to reset the main panel content to the initial content and store the previous content
|
| 75 |
def reset_main_panel(event):
|
| 76 |
global previous_content, current_state
|
| 77 |
-
|
| 78 |
# Store the previous content of the current state if it's not already stored
|
| 79 |
-
|
| 80 |
-
current_state = 'main_panel'
|
| 81 |
-
previous_content[current_state] = main_body_instance.main_body.copy()
|
| 82 |
-
else:
|
| 83 |
-
previous_content[current_state] = main_body_instance.main_body.copy()
|
| 84 |
|
| 85 |
current_state = 'main_panel'
|
| 86 |
# Reset the main panel to the initial state
|
|
@@ -92,11 +87,7 @@ def reset_main_panel(event):
|
|
| 92 |
def update_main_panel_button3(event):
|
| 93 |
global previous_content, current_state
|
| 94 |
# Store the previous content of the current state if it's not already stored
|
| 95 |
-
|
| 96 |
-
current_state = 'main_panel_button3'
|
| 97 |
-
previous_content[current_state] = main_body_instance.main_body.copy()
|
| 98 |
-
else:
|
| 99 |
-
previous_content[current_state] = main_body_instance.main_body.copy()
|
| 100 |
|
| 101 |
# Update the current state to main_panel_button3
|
| 102 |
current_state = 'main_panel_button3'
|
|
|
|
| 74 |
# Function to reset the main panel content to the initial content and store the previous content
|
| 75 |
def reset_main_panel(event):
|
| 76 |
global previous_content, current_state
|
|
|
|
| 77 |
# Store the previous content of the current state if it's not already stored
|
| 78 |
+
previous_content[current_state] = main_body_instance.main_body.copy()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
current_state = 'main_panel'
|
| 81 |
# Reset the main panel to the initial state
|
|
|
|
| 87 |
def update_main_panel_button3(event):
|
| 88 |
global previous_content, current_state
|
| 89 |
# Store the previous content of the current state if it's not already stored
|
| 90 |
+
previous_content[current_state] = main_body_instance.main_body.copy()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
# Update the current state to main_panel_button3
|
| 93 |
current_state = 'main_panel_button3'
|