summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-04-19 20:03:11 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-04-19 20:03:11 +0200
commitb9465e47a584e7febded8b0f6d14a967479c4fa4 (patch)
tree4458ee1cf74ea4627a526036d37351ffc8f12fcd
parent388bb6d2cebd190e0912652dc970970c29615507 (diff)
parentce5117fe5d2bed8eeab9f96e9da72342c6e1ff47 (diff)
merge
-rw-r--r--src/PSEditor.cxx3
-rw-r--r--src/flpsed.cxx7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/PSEditor.cxx b/src/PSEditor.cxx
index a2df43f..9eeffb9 100644
--- a/src/PSEditor.cxx
+++ b/src/PSEditor.cxx
@@ -30,6 +30,7 @@ PSEditor::PSEditor(int X,int Y,int W, int H) : PSEditWidget(X, Y, W, H) {
loaded = 0;
mod = 0;
ps_level = 1;
+ tmp_fd = -1;
}
@@ -111,7 +112,7 @@ int PSEditor::handle(int event) {
int PSEditor::open_file(FILE *fp) {
- if (tmp_fd) {
+ if (tmp_fd >= 0) {
close(tmp_fd);
}
diff --git a/src/flpsed.cxx b/src/flpsed.cxx
index 1492c5d..03f07ea 100644
--- a/src/flpsed.cxx
+++ b/src/flpsed.cxx
@@ -312,11 +312,12 @@ void zoom_cb(Fl_Widget *w, void *) {
Fl_Menu_* mw = (Fl_Menu_*)w;
const Fl_Menu_Item* m = mw->mvalue();
if (m) {
- if (scroll) {
- scroll->position(0,0);
- }
if (psed_p) {
psed_p->zoom(atoi(m->label()));
+ if (scroll) {
+ scroll->position(0,0);
+ scroll->redraw();
+ }
}
}
}