diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-11-26 01:35:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-26 01:35:50 +0100 |
| commit | 6e5c472cf9641426c5425ea2f404e8908d76d63e (patch) | |
| tree | 0f7ec46f88f01257702f1f9a7c8323a7fdc768c3 /fluid/align_widget.cxx | |
| parent | c1a7c4af042a593b4b3a1df3e750b0cc80362486 (diff) | |
Handle Fluid project settings better (#556)
Fix allocation bug in Fl_String
Diffstat (limited to 'fluid/align_widget.cxx')
| -rw-r--r-- | fluid/align_widget.cxx | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx index f9bf2c02f..37c4255e1 100644 --- a/fluid/align_widget.cxx +++ b/fluid/align_widget.cxx @@ -56,10 +56,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -93,10 +91,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -127,10 +123,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -160,10 +154,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -197,10 +189,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -231,10 +221,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -272,10 +260,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -315,10 +301,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -352,10 +336,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -385,10 +367,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -420,10 +400,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; if (o->next && o->next->level > o->level && !o->next->selected && !o->is_menu_button()) { @@ -444,10 +422,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; Fl_Widget *p = ((Fl_Widget_Type *)o->parent)->o; int center2; @@ -473,10 +449,8 @@ void align_widget_cb(Fl_Widget*, long how) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } - Fl_Widget *w = ((Fl_Widget_Type *)o)->o; Fl_Widget *p = ((Fl_Widget_Type *)o->parent)->o; int center2; @@ -498,6 +472,8 @@ void align_widget_cb(Fl_Widget*, long how) } break; } + if (changed) + set_modflag(1); } @@ -509,7 +485,6 @@ void widget_size_cb(Fl_Widget *, long size) { if (o->selected && o->is_widget()) { if (!changed) { changed = 1; - set_modflag(1); undo_checkpoint(); } @@ -525,4 +500,6 @@ void widget_size_cb(Fl_Widget *, long size) { if (w->window()) w->window()->redraw(); } } + if (changed) + set_modflag(1); } |
