MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / on_load

Method on_load

src/ui/editor/node_editor_window.py:244–255  ·  view source on GitHub ↗

Load a graph from file.

(self, file_path=None)

Source from the content-addressed store, hash-verified

242 self.file_ops.save_as()
243
244 def on_load(self, file_path=None):
245 """Load a graph from file."""
246 # Capture the current file path before it gets changed by file_ops.load()
247 old_file_path = self.file_ops.current_file_path
248
249 # Always save view state for the OLD file before switching (if there is one)
250 if old_file_path:
251 self.view_state.save_view_state(old_file_path)
252
253 if self.file_ops.load(file_path):
254 # Load view state for the NEW file after switching
255 self.view_state.load_view_state()
256
257 # Settings and environment handlers
258 def on_settings(self):

Calls 3

save_view_stateMethod · 0.80
loadMethod · 0.80
load_view_stateMethod · 0.80