summaryrefslogtreecommitdiff
path: root/src/PSEditModel.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2004-10-23 17:57:14 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2004-10-23 17:57:14 +0000
commitb68c113b7a5020ce0e0bb462fc8924e3739e7389 (patch)
treedefd7e334aac360508b874f010fbd50a232f66a4 /src/PSEditModel.cxx
parent286afda711bcf74b3f923778db7ca574815dc9e7 (diff)
reduce flicker
reduce flicker
Diffstat (limited to 'src/PSEditModel.cxx')
-rw-r--r--src/PSEditModel.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/PSEditModel.cxx b/src/PSEditModel.cxx
index a7542f2..368a667 100644
--- a/src/PSEditModel.cxx
+++ b/src/PSEditModel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditModel.cxx,v 1.3 2004/10/21 21:02:05 hofmann Exp $"
+// "$Id: PSEditModel.cxx,v 1.4 2004/10/23 19:57:14 hofmann Exp $"
//
// PSEditWidget routines.
//
@@ -94,13 +94,16 @@ void PSEditModel::new_text(int x1, int y1, const char *s, int size, int p) {
}
int PSEditModel::set_cur_text(int x1, int y1, int p) {
+ PSEditText *t;
+
if (p < 0 || p >= max_pages) {
return 1;
}
if (text[p]) {
- cur_text = text[p]->get_match(x1, y1);
- if (cur_text) {
+ t = text[p]->get_match(x1, y1);
+ if (t) {
+ cur_text = t;
return 0;
}
}
@@ -111,6 +114,10 @@ int PSEditModel::is_cur_text(PSEditText *t) {
return (t && t == cur_text);
}
+PSEditText *PSEditModel::get_cur_text() {
+ return cur_text;
+}
+
void PSEditModel::append_text(const char *s) {
if (cur_text && s) {
cur_text->append_text(s);