summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-06-19 08:08:48 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-06-19 08:08:48 +0000
commit0148f1cfd00199dfb5571dbf2705a895dc773e15 (patch)
tree399d9319e740f15c30754ad687f64d4495a4457e
parent0728999a83c66c1fb1b346d0238305b4a484ef6d (diff)
Mark a FLUID Project as "modified" when the user changes the visible Tab widget because that change will reflect in the generated source code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5213 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--fluid/Fl_Group_Type.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/fluid/Fl_Group_Type.cxx b/fluid/Fl_Group_Type.cxx
index f80652bfb..bb5834b0f 100644
--- a/fluid/Fl_Group_Type.cxx
+++ b/fluid/Fl_Group_Type.cxx
@@ -161,10 +161,14 @@ Fl_Type* Fl_Tabs_Type::click_test(int x, int y) {
Fl_Tabs *t = (Fl_Tabs*)o;
Fl_Widget *a = t->which(x,y);
if (!a) return 0; // didn't click on tab
+ // changing the visible tab has an impact on the generated
+ // source code, so mark this project as changed.
+ int changed = (a!=t->value());
// okay, run the tabs ui until they let go of mouse:
t->handle(FL_PUSH);
Fl::pushed(t);
while (Fl::pushed()==t) Fl::wait();
+ if (changed) set_modflag(1);
return (Fl_Type*)(t->value()->user_data());
}