FLUID: Improved paste order option

This commit is contained in:
Matthias Melcher 2024-09-15 14:00:10 +02:00
parent b9b2f5d10f
commit da20d8397d
2 changed files with 5 additions and 0 deletions

View File

@ -406,6 +406,9 @@ Fl_Type *Fd_Project_Reader::read_children(Fl_Type *p, int merge, Strategy strate
t->layout_widget();
}
if (strategy == kAddAsFirstChild) {
strategy = kAddAfterCurrent;
}
if (strategy == kAddAfterCurrent) {
Fl_Type::current = t;
} else {

View File

@ -1421,6 +1421,8 @@ void paste_cb(Fl_Widget*, void*) {
// If the current widget is a group widget and it is not folded,
// add the new widgets inside the group.
strategy = kAddAsLastChild;
// The following alternative also works quite nicely
//strategy = kAddAsFirstChild;
}
}
if (!read_file(cutfname(), 1, strategy)) {