diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-10-23 18:00:51 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-10-23 18:00:51 +0000 |
commit | a6eb8c7fe8a52d0d2fc5d9d3cf2a186745eac3c0 (patch) | |
tree | f52ceafe2741ba94356e03d854bf68910883eb7f /src | |
parent | b68c113b7a5020ce0e0bb462fc8924e3739e7389 (diff) |
reduce flicker
reduce flicker
Diffstat (limited to 'src')
-rw-r--r-- | src/PSEditWidget.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx index 2eab468..47255d8 100644 --- a/src/PSEditWidget.cxx +++ b/src/PSEditWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditWidget.cxx,v 1.21 2004/10/23 19:57:14 hofmann Exp $" +// "$Id: PSEditWidget.cxx,v 1.22 2004/10/23 20:00:51 hofmann Exp $" // // PSEditWidget routines. // @@ -180,9 +180,24 @@ void PSEditWidget::set_cur_size(int s) { } void PSEditWidget::set_size(int s) { + PSEditText *t; + int old_size; + + t = model->get_cur_text(); + if (t) { + old_size = t->get_size(); + } + set_cur_size(s); model->set_size(s); - redraw(); + + if (t) { + fl_font(FL_HELVETICA, t->get_size()); + damage(4, t->get_x() - 10, t->get_y() - fl_height() - 20, fl_width(t->get_text()) + 20, fl_height() + 30); + fl_font(FL_HELVETICA, old_size); + damage(4, t->get_x() - 10, t->get_y() - fl_height() - 20, fl_width(t->get_text()) + 20, fl_height() + 30); + } + } int PSEditWidget::get_size() { |