From 7446a4d5bb9bd77e3dbdcb16d0292fd44aa18dff Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 30 Sep 2011 10:20:09 +0000 Subject: Text area width needs to be recalculated if vertical scrollbar changes visibility. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Display.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Fl_Text_Display.cxx') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index a7d315e69..05a9eb60b 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -295,6 +295,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { text_area.y = Y+TOP_MARGIN; text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN; text_area.h = H-TOP_MARGIN-BOTTOM_MARGIN; + const int oldTAWidth = text_area.w; int i; /* Find the new maximum font height for this text display */ @@ -341,6 +342,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { // figure the scrollbars if (scrollbar_width()) { /* Decide if the vertical scrollbar needs to be visible */ + int vbvis = mVScrollBar->visible(); if (scrollbar_align() & (FL_ALIGN_LEFT|FL_ALIGN_RIGHT) && mNBufferLines >= mNVisibleLines - 1) { @@ -357,6 +359,7 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) { scrollbar_width(), text_area.h+TOP_MARGIN+BOTTOM_MARGIN); } } + if (vbvis != mVScrollBar->visible()) again = 1; /* Decide if the horizontal scrollbar needs to be visible. If the text -- cgit v1.2.3