The polyline tool acts weird when trying to undo

bandicam 2025-05-25 07-02-04-039

Basically, undoing actions after using the line tool results in it undoing other lines drawn. Also, if the first lines I draw are with the line tool, then pressing Ctrl+Z will do nothing (the lines will just stay there).

To specify, I’m using Windows 10 on the latest version of Pencil2D. (Also, this issue was prevalent with the previous version I was using as well.)

I do not think it is a problem with the drawing pad I’m using (which is a Veikk drawing pad).

Could someone tell me what’s wrong or how to fix this?

The problem with any computer based system like Pencil2D is that it doesn’t see the world in the same terms as us humans.

We might think of the process we’ve just performed as a single step, called a process in computing terms. But the software may see it as 2 or even 3 steps.

So you might need to click on the undo icon more than once to achieve the desired result.

There’s also a danger that you think you’ve clicked the icon once, but because of the repeat function you clicked it multiple times.

Ok, but it only occurs with the line tool; everything else undoes as expected. It’s not just with the built-in undo button but with the shortcut as well.

Pressing it multiple times just undoes everything else as well, like expected, but according to the way you’ve phrased yourself, the lines do not reappear in the order they were drawn after the first undo; it treats each line as if the process of making them never ended.

Do you mean that with the polyline tool, each line drawn follows a series of multiple steps that see each line as a whole collection, which would be why when trying to undo, it undoes more than expected?

Also, I’m not sure what you mean by repeat function; could you please elaborate? Like, is that a feature built into pencil2D, or is it just a process of programs in general that can or can’t be toggled on or off, or something to do with my settings? Either way, every other line I draw using other tools undoes without undoing other lines, which is the problem I face when using the polyline tool, So I don’t think that’s the case.

Hi garlic_tree_95537

Thanks for reporting this. In order to narrow down the problem faster in the future it’s important to write down the specific steps you do to get the behavior you see. :slight_smile:

I was initially wondering why I hadn’t stumbled into this before, especially if it’s been in previous versions as well…

I can confirm this happens if you use enter to end the curve, where as using double-click works correctly for me.

I’ll see if we can get a fix into our upcoming 0.7.1 release

1 Like

Don’t be too sure, that you’ve solved the problem. Using a computer, with limited memory, a slower processor with only 2 cores, I can replicate the problem show by Garlic_Tree.

But when using a computer with much more memory, in this case 16 Gbytes, a faster processor and many more cores the problem doesn’t happen. Why is this the case?

I think that this could involve the interrupt stack becoming full and overflowing. This can be made worse, if several programmes are being used because they have to be paged in and out as appropriate. This generates more interupt calls.

If you examine the video, produced by Garlic_Tree there what appears to be a point of black, the line colour left after the undo function has been used.

This is in fact a very short line drawn using the line tool which cannot be deleted using the undo button because it’s behond the delete stack limit!

The reason that I initially didn’t notice this problem was because I usually use a powerful desktop computer for work projects and I use a low power laptop as a sketchbook.

I think that you also need to consider the point raised earlier by stop.motion.vector that the number of actions in the stack may not correspond to the number when examined by a human animator.

Therefore the undo and redo stack depth may require to be increased.

In practice I never use the undo and or redo actions and if a problem is detected. I will either return to the previous saved position and then rebuild from there or delete the errors using the rubber or Lasso and delete functions.