diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-15 17:26:46 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-15 17:26:46 +0000 |
| commit | 6c3f9a03d157fdaa145ad0e99cef9344006ae180 (patch) | |
| tree | cbb7199caf324021482a21eca06c6730b8c0d02a /src/Fl_Text_Display.cxx | |
| parent | d3c1d6b8ad76f67758adde789c95c715aa5e262b (diff) | |
Resize the text display widget when the buffer is changed.
Don't stop a resize if we are not visible (holdover from 2.0 code...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2587 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 2082fe631..9b0d0b6ee 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.25 2002/08/12 20:24:31 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.26 2002/08/15 17:26:46 easysw Exp $" // // Copyright 2001-2002 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -150,6 +150,9 @@ void Fl_Text_Display::buffer( Fl_Text_Buffer *buf ) { /* Update the display */ buffer_modified_cb( 0, buf->length(), 0, 0, 0, this ); + + /* Resize the widget to update the screen... */ + resize(x(), y(), w(), h()); } /* @@ -193,7 +196,7 @@ int Fl_Text_Display::longest_vline() { */ void Fl_Text_Display::resize(int X, int Y, int W, int H) { Fl_Widget::resize(X,Y,W,H); - if (!buffer() || !visible_r()) return; + if (!buffer()) return; X += Fl::box_dx(box()); Y += Fl::box_dy(box()); W -= Fl::box_dw(box()); @@ -1973,5 +1976,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.25 2002/08/12 20:24:31 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.26 2002/08/15 17:26:46 easysw Exp $". // |
