[tools] [eraser advanced] resize eraser and remove shape based with history method #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Apr 06, 2023
Eraser Advanced
Resize [-/=]
Idea: besides the default size eraser, it will have 3 other size: small(s: 3x3), medium(m: 5x5), large(l: 9x9)
Solution:
Progress:
-
to decrease size or=
to increase size of eraserProblems:
resize
interface for all tools seems ...Shape-based
Idea: besides erasing cell by cell, user can also hold
Ctrl
and click to remove the whole shape. each shape wrapped aroundnumber
will be erased just with a singleCtrl
+Click
Solution:
I first implemented this feature based on
HISTORY_MANAGER
, trying to erase the shape that each history version saved, following the logic:pos
history.versions
vectorversion.edits
vectoredit.index == pos
, return the wholeindex
in thatedits
grid_list[index] = CHAR_SPACE
HISTORY_MANAGER.save_version()
Although, I believe this shouldn't be the right way to implement this. shouldn't mess up with the
HISTORY_MANAGER
Progress:
Problems:
edit.index
always== pos
at this point) <--- I'm trying to bypass with by specifing the tool stored the version and ignore the tool == SelectionWhen we copy/paste a combination of shapes, that will be grouped too 🙉
If we still keeping this method, the code need to be compatible with another method by just one change