Skip to content

Commit

Permalink
mainwindow: Make it so that inserted things get added below the selec…
Browse files Browse the repository at this point in the history
…ted object and not above, when done for multiple objects caused it to insert backwards. Fixes Separate all frames showing the last frame first on top of the original mesh and the other frames in reverse order after that.

Requested by @Dalion (https://discord.com/channels/411286129317249035/411291151979773963) and @erundil (https://discord.com/channels/411286129317249035/411291151979773963/1294642639521579130)

Marco mentions this in the comment, but still does it backwards, there has to be a reason. We'll see. ¯\_(ツ)_/¯
  • Loading branch information
Swyter committed Oct 17, 2024
1 parent 3c942df commit ca4b65f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ template<class BrfType> void MainWindow::insert( vector<BrfType> &v, const BrfTy
v.push_back(o);
newpos=v.size()-1;
} else {
int i = selector->lastSelected(); /* +1 for inserting AFTER the current */
int i = selector->lastSelected() + 1; /* +1 for inserting AFTER the current */ /* swy: added that +1 so that inserted stuff line split animation frames don't appear backwards, why wasn't like this before? */
if (i<0 || i>=(int)v.size()) i=v.size();
if (i==(int)v.size()) v.push_back(o); else
v.insert( v.begin()+i, o);
Expand Down

0 comments on commit ca4b65f

Please sign in to comment.