summaryrefslogtreecommitdiff
path: root/fluid/factory.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2021-12-16 19:30:59 +0100
committerMatthias Melcher <github@matthiasm.com>2021-12-16 19:51:37 +0100
commit983777535eb72de453cd84f73d791108d5453b81 (patch)
tree5d9bfb99482bbdb927aad7a025b584e83a279283 /fluid/factory.cxx
parent20593074c685540567416ac3b23afab44db1460a (diff)
GitHub #329: fixed missing code
Commented out code was obsolete. line_len was a true bug which can shred the end of lines. Removed Warning
Diffstat (limited to 'fluid/factory.cxx')
-rw-r--r--fluid/factory.cxx17
1 files changed, 0 insertions, 17 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index dfc75d930..d3888c654 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -1053,7 +1053,6 @@ static Fl_Type *known_types[] = {
Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
undo_checkpoint();
undo_suspend();
- Fl_Type *ins = Fl_Type::current;
Fl_Type *t = ((Fl_Type*)inPrototype)->make(strategy);
if (t) {
if (t->is_widget() && !t->is_window()) {
@@ -1087,22 +1086,6 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
}
}
}
-#if 0
- // Fluid inserts widgets always as the last child of a matching group.
- // This is great when reading a file, but if users do thins interactively,
- // they expect the new widget close to where they worked previously.
- if (ins) {
- // if the new and current widget are siblings, just move it here.
- if (ins->level==t->level) {
- Fl_Type *c;
- for (c=t; c && c!=ins && c->level>=t->level; c=c->prev) { }
- if (c==ins) {
- t->move_before(ins); // together the same as 'move_after'
- ins->move_before(t);
- }
- }
- }
-#endif
// make the new widget visible
select_only(t);
set_modflag(1);