Fix add gradient stop when last stop is selected
This commit enables the insertion of a new gradient stop through the gradient toolbar when the last gradient stop is selected. As discussed in the issue description, the new stop will be added between the second-to-last and last gradient stops.
Fixes: #1261