mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
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:
@@ -10,7 +10,7 @@ CHANGES IN FLTK 1.1.7
|
|||||||
- FLUID now knows if a static callback is already declared
|
- FLUID now knows if a static callback is already declared
|
||||||
in a class and won't declare it 'extern' (STR #776)
|
in a class and won't declare it 'extern' (STR #776)
|
||||||
- Some actions in FLUID would not set the
|
- 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
|
- fl_filename_list now always appends a forward slash to
|
||||||
directory names (STR #874)
|
directory names (STR #874)
|
||||||
- Multiline Input will update right if a space character is
|
- Multiline Input will update right if a space character is
|
||||||
|
|||||||
+12
-2
@@ -733,28 +733,38 @@ void Fl_Type::move_before(Fl_Type* g) {
|
|||||||
// move selected widgets in their parent's list:
|
// move selected widgets in their parent's list:
|
||||||
void earlier_cb(Fl_Widget*,void*) {
|
void earlier_cb(Fl_Widget*,void*) {
|
||||||
Fl_Type *f;
|
Fl_Type *f;
|
||||||
|
int mod = 0;
|
||||||
for (f = Fl_Type::first; f; ) {
|
for (f = Fl_Type::first; f; ) {
|
||||||
Fl_Type* nxt = f->next;
|
Fl_Type* nxt = f->next;
|
||||||
if (f->selected) {
|
if (f->selected) {
|
||||||
Fl_Type* g;
|
Fl_Type* g;
|
||||||
for (g = f->prev; g && g->level > f->level; g = g->prev);
|
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;
|
f = nxt;
|
||||||
}
|
}
|
||||||
|
if (mod) set_modflag(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void later_cb(Fl_Widget*,void*) {
|
void later_cb(Fl_Widget*,void*) {
|
||||||
Fl_Type *f;
|
Fl_Type *f;
|
||||||
|
int mod = 0;
|
||||||
for (f = Fl_Type::last; f; ) {
|
for (f = Fl_Type::last; f; ) {
|
||||||
Fl_Type* prv = f->prev;
|
Fl_Type* prv = f->prev;
|
||||||
if (f->selected) {
|
if (f->selected) {
|
||||||
Fl_Type* g;
|
Fl_Type* g;
|
||||||
for (g = f->next; g && g->level > f->level; g = g->next);
|
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;
|
f = prv;
|
||||||
}
|
}
|
||||||
|
if (mod) set_modflag(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user