diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-11-08 18:36:14 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2004-11-08 18:36:14 +0000 |
commit | e8cd2063669a04e3782b187fdd0be336efb157db (patch) | |
tree | 3deabee9930a8560a53b4fa7c20b5522b67152c5 /src/PSEditWidget.cxx | |
parent | 4ef45e532c786dc02b2c5f2141fb713264143c8c (diff) |
fix move interface
fix move interface
Diffstat (limited to 'src/PSEditWidget.cxx')
-rw-r--r-- | src/PSEditWidget.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx index 95ddbde..9d20618 100644 --- a/src/PSEditWidget.cxx +++ b/src/PSEditWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditWidget.cxx,v 1.26 2004/11/08 18:56:00 hofmann Exp $" +// "$Id: PSEditWidget.cxx,v 1.27 2004/11/08 19:36:14 hofmann Exp $" // // PSEditWidget routines. // @@ -75,7 +75,8 @@ void PSEditWidget::draw() { } } -PSEditWidget::PSEditWidget(int X,int Y,int W, int H) : GsWidget(X, Y, W, H) { +PSEditWidget::PSEditWidget(int X,int Y,int W, int H): GsWidget(X, Y, W, H) { + model = new PSEditModel(paper_x, paper_y, xdpi, ydpi); cur_size = 12; show_tags = 1; @@ -161,15 +162,24 @@ void PSEditWidget::append_text(const char *s) { } } -void PSEditWidget::move(int x1, int y1, int last_x, int last_y) { +void PSEditWidget::move(int x1, int y1) { PSEditText *t; + int old_bbx, old_bby, old_bbw, old_bbh; + + t = model->get_cur_text(); + if (t) { + old_bbx = bb_x(t); + old_bby = bb_y(t); + old_bbw = bb_w(t); + old_bbh = bb_h(t); + } model->move(x1, y1); mod++; - t = model->get_cur_text(); + if (t) { + damage(4, old_bbx, old_bby, old_bbw, old_bbh); damage(4, bb_x(t), bb_y(t), bb_w(t), bb_h(t)); - damage(4, last_x - 10, last_y - fl_height() - 20, bb_w(t), bb_h(t)); } } |