mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 10:27:46 +00:00
Move update to is_reload status of run_config out of ReloadManager
This commit is contained in:
parent
1d67768a13
commit
ae93d8fcc6
2 changed files with 4 additions and 9 deletions
|
|
@ -26,7 +26,6 @@ class ReloadManager:
|
|||
"""
|
||||
|
||||
window = None
|
||||
is_reload = False
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
|
|
@ -44,10 +43,6 @@ class ReloadManager:
|
|||
except KeyboardInterrupt:
|
||||
break
|
||||
|
||||
def note_reload(self):
|
||||
self.is_reload = True
|
||||
print("Reloading...")
|
||||
|
||||
def retrieve_scenes_and_run(self):
|
||||
"""
|
||||
Take the global configuration, which is based on CLI arguments,
|
||||
|
|
@ -58,8 +53,6 @@ class ReloadManager:
|
|||
scene_config = global_config["scene"]
|
||||
run_config = global_config["run"]
|
||||
|
||||
run_config.update(is_reload=self.is_reload)
|
||||
|
||||
# Create or reuse window
|
||||
if run_config["show_in_window"] and not self.window:
|
||||
self.window = Window(**global_config["window"])
|
||||
|
|
|
|||
|
|
@ -127,12 +127,14 @@ def reload_scene(embed_line: int | None = None) -> None:
|
|||
`set_custom_exc` method, we cannot break out of the IPython shell by
|
||||
this means.
|
||||
"""
|
||||
run_config = get_global_config()["run"]
|
||||
run_config["is_reload"] = True
|
||||
if embed_line:
|
||||
global_config = get_global_config()
|
||||
global_config["run"]["embed_line"] = embed_line
|
||||
run_config["embed_line"] = embed_line
|
||||
|
||||
shell = get_ipython()
|
||||
if shell:
|
||||
print("Reloading...")
|
||||
shell.run_line_magic("exit_raise", "")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue