Create a block, e.g. test1
Then delete the block, the block list is empty
Create a new block test1 again, LC says that a block with name test1 already exists
this behavior is by design. in order to enable "undo" for block deletion, a deleted block is not removed from storage, only labelled as "deleted", therefore, creating a new block with the same name is not possible.
there's no easy solution here. We can delete this block permenantly, whenever user requests a new block with the same name, but it's not perfect either.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another solution: If the user tries to add a block with the same name as a block marked 'deleted' give a warning (effectively the same dialog box which exists), and options:
Remove the deleted block and accept save
Rename the new block
Cancel the operation
Or, maybe even better (it doesn't leave the user asking why the save doesn't work):
Leave the 'marked for deletion' block in the table, with a flag 'deleted' (maybe 'grayed out'. Another delete '-' of the same line effectively deletes it.
Last edit: John Coppens 2014-12-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this behavior is by design. in order to enable "undo" for block deletion, a deleted block is not removed from storage, only labelled as "deleted", therefore, creating a new block with the same name is not possible.
there's no easy solution here. We can delete this block permenantly, whenever user requests a new block with the same name, but it's not perfect either.
another solution:
if user requests a new block name which is taken by a deleted block, we can silently rename the deleted block.
Another solution: If the user tries to add a block with the same name as a block marked 'deleted' give a warning (effectively the same dialog box which exists), and options:
Or, maybe even better (it doesn't leave the user asking why the save doesn't work):
Leave the 'marked for deletion' block in the table, with a flag 'deleted' (maybe 'grayed out'. Another delete '-' of the same line effectively deletes it.
Last edit: John Coppens 2014-12-25
I'll close this because of a new duplicate on github.
See github issue #716 for further discussions.