diff --git "a/pages/0_\360\237\223\201_File_Upload.py" "b/pages/0_\360\237\223\201_File_Upload.py" index 46bee9d..6ca3df6 100644 --- "a/pages/0_\360\237\223\201_File_Upload.py" +++ "b/pages/0_\360\237\223\201_File_Upload.py" @@ -10,6 +10,9 @@ st.title("File Upload") +if "selected-mzML-files" not in st.session_state: + st.session_state["selected-mzML-files"] = params["selected-mzML-files"] + tabs = ["File Upload", "Example Data"] if st.session_state.location == "local": tabs.append("Files from local folder") diff --git a/src/common.py b/src/common.py index b12081e..fdf6d7b 100644 --- a/src/common.py +++ b/src/common.py @@ -202,6 +202,9 @@ def render_sidebar(page: str = "") -> None: elif st.session_state.location == "local": # Define callback function to change workspace def change_workspace(): + for key in params.keys(): + if key in st.session_state.keys(): + del st.session_state[key] st.session_state.workspace = Path( workspaces_dir, st.session_state["chosen-workspace"] )