diff --git a/Timeline/Loggable.C b/Timeline/Loggable.C index 484475d..1f87eaa 100644 --- a/Timeline/Loggable.C +++ b/Timeline/Loggable.C @@ -343,7 +343,7 @@ Loggable::undo ( void ) _undo_index = ui + 2; - delete buf; + delete[] buf; } /** write a snapshot of the state of all loggable objects, sufficient diff --git a/Timeline/Makefile b/Timeline/Makefile index 94b3c1b..e373602 100644 --- a/Timeline/Makefile +++ b/Timeline/Makefile @@ -47,6 +47,6 @@ clean: rm -f $(OBJS) timeline makedepend valgrind: - valgrind ./test + valgrind ./timeline include makedepend diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 8b747b0..443b618 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -51,7 +51,8 @@ pack_visible_height ( const Fl_Pack *p ) { int th = 0; - for ( const Fl_Widget* const *w = p->array(); *w; ++w ) + const Fl_Widget* const *w = p->array(); + for ( int i = p->children(); i--; ++w ) if ( (*w)->visible() ) th += (*w)->h() + p->spacing(); @@ -104,6 +105,9 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Wi box( FL_FLAT_BOX ); xoffset = 0; + _yposition = 0; + _old_yposition = 0; + _old_xposition = 0; X = Y = 0;