open new file when dropped on window

This commit is contained in:
Kartik K. Agaram 2023-04-20 20:09:26 -07:00
parent 11651bfe62
commit 521d7825c3
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,5 @@
on.quit = function()
if Global_next_save then
save_graph_to_disk()
Global_next_save = nil
end
end

11
0064-on.file_drop Normal file
View File

@ -0,0 +1,11 @@
on.file_drop = function(file)
if Global_next_save then
save_graph_to_disk()
Global_next_save = nil
end
Filename = file:getFilename()
if file_exists(Filename) then
load_graph_from_disk()
end
A()
end