Bug: Creating New Block With Same Name of a Deleted One Does not Work

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug: Creating New Block With Same Name of a Deleted One Does not Work

ab-tools
Hello,

I think I found a minor bug - here is how to reproduce it:
- create a block with name "test" (with any object, doesn't matter)
- delete this block
- create a block with the same name "test" again
=> it will complain that a block with this name exists already which isn't the case.

You need to close and open the file to be able to create the block with the same name again.

Best regards
Andreas
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Creating New Block With Same Name of a Deleted One Does not Work

dxli
yes, this is considered a bug.

The reason for the bug behaviour is due to the "redo/undo" system.

when a block is deleted, it exists in the "redo/undo" system, creating a new block by the same name is not allowed.

I feel a possible fix could be:

1, modify the block name when it's deleted. It could be prepending/appending a character: #, ~, etc.;
2, when undo a deletion, restore the the block name before deletion, if there's no collision; if the name is already taken, replace the prepended/appended characters with another character: _, for example.


ab-tools wrote
Hello,

I think I found a minor bug - here is how to reproduce it:
- create a block with name "test" (with any object, doesn't matter)
- delete this block
- create a block with the same name "test" again
=> it will complain that a block with this name exists already which isn't the case.

You need to close and open the file to be able to create the block with the same name again.

Best regards
Andreas