diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-06-30 04:23:13 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-06-30 04:23:13 +0000 |
| commit | a5ae7d54a6aa1101d1695621136cb06402bd76ef (patch) | |
| tree | b69974c6e7437f6a135677a269888ce7d3730553 | |
| parent | e2e44bfcd5a04334e71114e124ddd90dd28cecb5 (diff) | |
Fix suggested by Stuart Levy to fix scrolling when deleting items from
the browser.
I replaced the -$(MAKEFLAGS) with $(MFLAGS) as per the gmake
documenation. Apperntly this works with other make programs and
MAKEFLAGS is passed invisibly by gmake, though the documenation is not
too clear...
VS: ----------------------------------------------------------------------
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1245 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | src/Fl_Browser_.cxx | 24 |
2 files changed, 22 insertions, 16 deletions
@@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.12.2.3 2000/06/05 21:20:16 mike Exp $" +# "$Id: Makefile,v 1.12.2.4 2000/06/30 04:23:12 spitzak Exp $" # # Top-level makefile for the Fast Light Tool Kit (FLTK). # @@ -33,7 +33,7 @@ all: makeinclude if test ! -f $$dir/makedepend; then\ touch $$dir/makedepend;\ fi;\ - (cd $$dir; $(MAKE) -$(MAKEFLAGS)) || break;\ + (cd $$dir; $(MAKE) $(MFLAGS)) || break;\ done install: makeinclude @@ -42,9 +42,9 @@ install: makeinclude if test ! -f $$dir/makedepend; then\ touch $$dir/makedepend;\ fi;\ - (cd $$dir; $(MAKE) -$(MAKEFLAGS) install) || break;\ + (cd $$dir; $(MAKE) $(MFLAGS) install) || break;\ done - (cd documentation; $(MAKE) -$(MAKEFLAGS) install) + (cd documentation; $(MAKE) $(MFLAGS) install) depend: makeinclude @for dir in $(DIRS); do\ @@ -52,14 +52,14 @@ depend: makeinclude if test ! -f $$dir/makedepend; then\ touch $$dir/makedepend;\ fi;\ - (cd $$dir; $(MAKE) -$(MAKEFLAGS) depend) || break;\ + (cd $$dir; $(MAKE) $(MFLAGS) depend) || break;\ done clean: -@ rm -f core config.cache *.o *.bck @for dir in $(DIRS); do\ echo "=== cleaning $$dir ===";\ - (cd $$dir; $(MAKE) -$(MAKEFLAGS) clean) || break;\ + (cd $$dir; $(MAKE) $(MFLAGS) clean) || break;\ done distclean: clean @@ -69,5 +69,5 @@ makeinclude: configure configh.in makeinclude.in ./configure # -# End of "$Id: Makefile,v 1.12.2.3 2000/06/05 21:20:16 mike Exp $". +# End of "$Id: Makefile,v 1.12.2.4 2000/06/30 04:23:12 spitzak Exp $". # diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index 31f6ab885..4df4d7d15 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser_.cxx,v 1.10.2.13 2000/06/05 21:20:48 mike Exp $" +// "$Id: Fl_Browser_.cxx,v 1.10.2.14 2000/06/30 04:23:13 spitzak Exp $" // // Base Browser widget class for the Fast Light Tool Kit (FLTK). // @@ -397,14 +397,20 @@ void Fl_Browser_::new_list() { // Tell it that this item is going away, and that this must remove // all pointers to it: void Fl_Browser_::deleting(void* l) { - if (displayed(l)) redraw_lines(); - if (l == selection_) selection_ = 0; - if (l == top_) { - real_position_ -= offset_; - offset_ = 0; - top_ = item_next(l); - if (!top_) top_ = item_prev(l); + if (displayed(l)) { + redraw_lines(); + if (l == top_) { + real_position_ -= offset_; + offset_ = 0; + top_ = item_next(l); + if (!top_) top_ = item_prev(l); + } + } else { + // we don't know where this item is, recalculate top... + real_position_ = 0; + top_ = 0; } + if (l == selection_) selection_ = 0; if (l == max_width_item) {max_width_item = 0; max_width = 0;} } @@ -700,5 +706,5 @@ void Fl_Browser_::item_select(void*, int) {} int Fl_Browser_::item_selected(void* l) const {return l==selection_;} // -// End of "$Id: Fl_Browser_.cxx,v 1.10.2.13 2000/06/05 21:20:48 mike Exp $". +// End of "$Id: Fl_Browser_.cxx,v 1.10.2.14 2000/06/30 04:23:13 spitzak Exp $". // |
