From a2f4b27b271098c9414721ae9e0b38654a5e900c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 20 Mar 2005 04:00:48 +0000 Subject: Undo/redo support for FLUID. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/function_panel.fl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'fluid/function_panel.fl') diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl index e70956b2a..84bcd557f 100644 --- a/fluid/function_panel.fl +++ b/fluid/function_panel.fl @@ -35,6 +35,8 @@ decl {\#include } {} decl {\#include "Fl_Type.h"} {} +decl {\#include "undo.h"} {} + decl {extern class Fl_Pixmap *pixmap[];} {} decl {extern class Fl_Type *Fl_Type_make(const char*);} {} @@ -265,8 +267,13 @@ Function {make_comment_panel()} {open Function {type_make_cb(Fl_Widget*w,void*d)} {open return_type void } { - code {Fl_Type *t = Fl_Type_make((char*)d); -if (t) {select_only(t); set_modflag(1); t->open();}} {} + code {undo_checkpoint(); + Fl_Type *t = Fl_Type_make((char*)d); + if (t) { + select_only(t); + set_modflag(1); + t->open(); + }} {} } Function {make_widgetbin()} {open -- cgit v1.2.3