From 8d64fe84ddc4167679a7c8db86cd11329ceb4551 Mon Sep 17 00:00:00 2001 From: hexameron Date: Sun, 17 May 2015 08:24:24 +0000 Subject: [PATCH] Uninitialised StyleBuffer. https://github.com/jamescoxon/dl-fldigi/issues/22 Invalid data breaking fl_height() and fl_width() --- src/widgets/FTextView.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widgets/FTextView.cxx b/src/widgets/FTextView.cxx index 6687878b..b980362d 100644 --- a/src/widgets/FTextView.cxx +++ b/src/widgets/FTextView.cxx @@ -75,6 +75,7 @@ FTextBase::FTextBase(int x, int y, int w, int h, const char *l) sbuf = new Fl_Text_Buffer_mod; buffer(tbuf); + reset_styles(SET_FONT | SET_SIZE | SET_COLOR); highlight_data(sbuf, styles, NATTR, FTEXT_DEF, 0, 0); cursor_style(Fl_Text_Editor_mod::NORMAL_CURSOR); @@ -84,8 +85,6 @@ FTextBase::FTextBase(int x, int y, int w, int h, const char *l) // Do we want narrower scrollbars? The default width is 16. // scrollbar_width((int)floor(scrollbar_width() * 3.0/4.0)); - - reset_styles(SET_FONT | SET_SIZE | SET_COLOR); } void FTextBase::clear()