Hello,
I'm building a custom tool and to help the user the tool creates some construction lines ( RLineEntity ). These lines will be deleted at the end by the script.
The tool works as expected, but I have some problems with the undo command, since I got a crash.
I suppose that references of construction lines are still in the undo stack.
Is there a way to reset the undo stack in a safe state?
Thanks
sramp
Clear undo stack
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Clear undo stack
If you create and delete everything in operations (RAddObjectsOperation, RDeleteObjectsOperation, ...), this should never be an issue.
Perhaps, you can post the relevant part of your code?
Perhaps, you can post the relevant part of your code?
Re: Clear undo stack
There is an error in my logic and this is the real cause of the problem.
I create some lines ( undoable true )
....
I delete the lines ( undoable false )
If I set as undoable every operation everything works fine.
I could set not undoable the lines creation too, but this makes the tools less usable during the lines creation.
I create some lines ( undoable true )
....
I delete the lines ( undoable false )
If I set as undoable every operation everything works fine.
I could set not undoable the lines creation too, but this makes the tools less usable during the lines creation.
Re: Clear undo stack
Yes, undoable should actually always be true unless a file is being loaded.