summaryrefslogtreecommitdiff
path: root/fluid/factory.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-09-14 01:10:35 +0200
committerMatthias Melcher <github@matthiasm.com>2024-09-14 01:10:41 +0200
commite7f1247552fbb9d056d4c68eb51564a504df3161 (patch)
treecbaa15d7d58359d0fd59e86711881179ad34e134 /fluid/factory.cxx
parentbb917628ffa8ffc6cafc79da80344c8c9c653969 (diff)
FLUID: type node placement in scene graph revised
- fixes copy/paste operation that would place pasted types wrong - improves paste into folded and unfolded groups - improves duplication of multiple types - much improved placement of types that don;t fit at the requested position - some more testing will follow in the next days
Diffstat (limited to 'fluid/factory.cxx')
-rw-r--r--fluid/factory.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index a4072967f..56077020c 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -1342,11 +1342,11 @@ Fl_Type *add_new_widget_from_user(const char *inName, Strategy strategy, bool an
}
/**
- Callback for all menu items.
+ Callback for all non-widget menu items.
*/
static void cbf(Fl_Widget *, void *v) {
Fl_Type *t = NULL;
- if (Fl_Type::current && Fl_Type::current->is_a(ID_Group))
+ if (Fl_Type::current && Fl_Type::current->can_have_children())
t = ((Fl_Type*)v)->make(kAddAsLastChild);
else
t = ((Fl_Type*)v)->make(kAddAfterCurrent);
@@ -1354,11 +1354,11 @@ static void cbf(Fl_Widget *, void *v) {
}
/**
- Callback for all menu items.
+ Callback for all widget menu items.
*/
static void cb(Fl_Widget *, void *v) {
Fl_Type *t = NULL;
- if (Fl_Type::current && Fl_Type::current->is_a(ID_Group))
+ if (Fl_Type::current && Fl_Type::current->can_have_children())
t = add_new_widget_from_user((Fl_Type*)v, kAddAsLastChild);
else
t = add_new_widget_from_user((Fl_Type*)v, kAddAfterCurrent);