From c1910c06e6bbe136e144e034ed0e2fc8f3bf2716 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Fri, 27 Jul 2012 01:03:06 -0400 Subject: [PATCH] added small delay to the auto-saveas feature for the k12 mode --- src/pd.tk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pd.tk b/src/pd.tk index ffa7074e4..6f7ea8d96 100644 --- a/src/pd.tk +++ b/src/pd.tk @@ -2962,11 +2962,16 @@ proc pdtk_canvas_new {name width height geometry editable} { focus $name.c if { $k12_mode == 1 && $k12_saveas_on_new == 1 } { - pd [concat $name menusaveas \;] - set k12_saveas_on_new 0 + after 1000 [concat pdtk_k12_saveas_on_new $name] } } +proc pdtk_k12_saveas_on_new {name} { + global k12_saveas_on_new + pd [concat $name menusaveas \;] + set k12_saveas_on_new 0 +} + proc pdtk_noselect {name} { set topname [string trimright $name .c] pd [concat $topname noselect \;] -- GitLab