F2 and F3 (move up/down) would not set the "changed" flag

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4549 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-08-29 20:25:22 +00:00
parent a2effb7c2b
commit 8c479b5ea6
2 changed files with 13 additions and 3 deletions

View File

@ -10,7 +10,7 @@ CHANGES IN FLTK 1.1.7
- FLUID now knows if a static callback is already declared
in a class and won't declare it 'extern' (STR #776)
- Some actions in FLUID would not set the
"changed" flag (STR #984)
"changed" flag (STR #984, STR #999)
- fl_filename_list now always appends a forward slash to
directory names (STR #874)
- Multiline Input will update right if a space character is

View File

@ -733,28 +733,38 @@ void Fl_Type::move_before(Fl_Type* g) {
// move selected widgets in their parent's list:
void earlier_cb(Fl_Widget*,void*) {
Fl_Type *f;
int mod = 0;
for (f = Fl_Type::first; f; ) {
Fl_Type* nxt = f->next;
if (f->selected) {
Fl_Type* g;
for (g = f->prev; g && g->level > f->level; g = g->prev);
if (g && g->level == f->level && !g->selected) f->move_before(g);
if (g && g->level == f->level && !g->selected) {
f->move_before(g);
mod = 1;
}
}
f = nxt;
}
if (mod) set_modflag(1);
}
void later_cb(Fl_Widget*,void*) {
Fl_Type *f;
int mod = 0;
for (f = Fl_Type::last; f; ) {
Fl_Type* prv = f->prev;
if (f->selected) {
Fl_Type* g;
for (g = f->next; g && g->level > f->level; g = g->next);
if (g && g->level == f->level && !g->selected) g->move_before(f);
if (g && g->level == f->level && !g->selected) {
g->move_before(f);
mod = 1;
}
}
f = prv;
}
if (mod) set_modflag(1);
}
////////////////////////////////////////////////////////////////