Page 1 of 1

Undo vs TM; Odd behavior

Posted: Mon Nov 16, 2020 2:05 pm
by CVH
QCADpro 3.25.2.1 / win7pro 32 bit

Documented an odd behavior of Undo after Trim Both (TM)
The DXF includes Layer states Y1-Y3
Y1 are the originals.
Simply type 'Y' + number.

Off course the workaround is NOT to 'Trim Both' between a closed Polyline and a line segments.
Most obvious ... That's why I had to re-do the action with 'Trim'.
Undo Issue after TM.dxf
(112.5 KiB) Downloaded 1414 times


The purpose in this case:
Developing T2H is an 'On and off' project.
I was drafting some basic flowcharts with QCAD to keep track.


Regards,
CVH

Re: Undo vs TM; Odd behavior

Posted: Mon Nov 16, 2020 8:24 pm
by Husky
CVH wrote:
Mon Nov 16, 2020 2:05 pm
Off course the workaround is NOT to 'Trim Both' between a closed Polyline and a line segments.
Most obvious ... That's why I had to re-do the action with 'Trim'.
Insight is the best way to get better ...

I could agree on a not proper working undo but the rest is more an odd choice of tools for this kind of task ...
Example 1-3: Break out Segment (D2) would be the appropriated tool - not Trim Both (TM),
Example 4: Trim (TR) would be the right choice - not Trim Both (TM),

Re: Undo vs TM; Odd behavior

Posted: Mon Nov 16, 2020 9:42 pm
by CVH
Husky,

I was trimming corners of the flow lines.
It happened in a flick of the wrist and without noticing that I still had to switch methods.
Oops ... not to worry ... Undo and Oops again.

The examples are not real world.
The results differ from case to case.
That I discovered by documenting it.
It doesn't rely on the references chosen, not on the shapes but rather on the quadrant.

And NO, you don't use Trim Both between a segment and a closed form.
I think that I mentioned 'by accident' and that it is not the proper tool.

I documented an odd behavior of Undo. :wink:

Regards,
CVH

Re: Undo vs TM; Odd behavior

Posted: Sun Dec 13, 2020 11:41 pm
by CVH
Suggestion >> Bug report:
https://www.qcad.org/bugtracker/index.p ... sk_id=2145
Fixed.
Thanks, Andrew.

Re: Undo vs TM; Odd behavior

Posted: Tue Dec 22, 2020 8:56 am
by CVH
Bug should be fixed ...
Persistent in Version: 3.25.2.7
Regards, CVH

Re: Undo vs TM; Odd behavior

Posted: Wed Dec 23, 2020 3:10 am
by Husky
Nicely solved in QCAD Version: 3.25.2.7 - tested on a Win10/64 OS. Works like a charm - couldn't ask for more!

Re: Undo vs TM; Odd behavior

Posted: Wed Dec 23, 2020 4:55 am
by CVH
Husky,
Well you are right ... Now I can't reproduce the failure of 'Undo' overnew ??
After installing .7 I still could, otherwise I wouldn't have posted it was persistent ...

However ...
If we pick the closed form first we get:
The two entities don't intersect, or are currently not supported for trimming.

If we pick the line first, the line is trimmed correctly and we get a faulty trim of the closed form.
What can de undone.
So far, all is fine.

Now continue with Redo-Undo and after a few only the line remains.
Can you confirm this?

Regards,
CVH

Re: Undo vs TM; Odd behavior

Posted: Thu Mar 04, 2021 1:09 am
by bergdesign
I just updated to 3.26 on macOS, and while I don't recall seeing this bug after using Trim Both (TM) in 3.25, I am certainly running into it now. The undo stack is either getting corrupted or multiple operations are getting coalesced into one undo operation by Trim Both. Needless to say, this wreaks havoc on the file if I make a number of edits and them Trim Both, then undo after that... Many edits get lost.

I've attached a quick set of instruction and a file to reproduce it. The file is a 2D export from a 3D app, and it's littered with small line segments that need to be cleaned up, which a typical daily operation for me.

Thanks,
Brock

Screen Shot 2021-03-03 at 5.58.19 PM.png
Screen Shot 2021-03-03 at 5.58.19 PM.png (161.69 KiB) Viewed 14854 times
dash2.dxf
(219.09 KiB) Downloaded 1197 times

Re: Undo vs TM; Odd behavior

Posted: Thu Mar 04, 2021 1:33 am
by Husky
bergdesign wrote:
Thu Mar 04, 2021 1:09 am
The undo stack is either getting corrupted or multiple operations are getting coalesced into one undo operation by Trim Both
Can't reproduce that behavior on a Win10 OS. All Undoes are working step by step as expected ...

Re: Undo vs TM; Odd behavior

Posted: Thu Mar 04, 2021 4:00 am
by bergdesign
Thanks Husky. I needed that confirmation as a reality check, and I think I've managed to find the culprit when reproducing it again on my side...

I've been working on a script for converting segmented arcs to true arcs, and one of the things that I've been grappling with is a lack of details on operations and transaction stacks... I believe that my script leaves a transaction group open, and I'm seeing the effect when performing subsequent operations and undoing them. The odd thing is, I closed this very doc and reopened it, and the problem persisted so I assumed it wasn't related to my script. And even more oddly, not every subsequent operation is undone all at once... Some undo properly one-at-a-time, and then some undo all-at-once.

Anyway, thanks for checking.

Thanks,
Brock