-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layer merge #1206
base: master
Are you sure you want to change the base?
Layer merge #1206
Conversation
Personally I don't like that a dialog is needed to merge a layer. This can be done much simpler. I'd personally want to see this being a "select item on timeline to merge with", right-click and select "merge layers" As for the technical side. Only UI related actions should be implemented in the widgets themselves, otherwise it's impossible to test. The merge implementation should be added to Layer as a virtual function and then implemented in Vector layer and BitmapLayer respectively to handle each case. |
It could be done in many ways, and of course I like my suggestion best. |
Some Questions:
|
|
I think my idea this is what @candyface is suggesting but with a different wording. There could be a "Merge Visible" option which would merge all layers that are visible (and compatible). Or it could be a "Merge Down"/"Merge with Layer Below" option which merges the currently selected layer (or layer selected with a right click) with the one below it if possible. I would be most in favor of the latter option for its simplicity, lack of dialog window, and similarity to functions in other applications such as GIMP and Krita. They could be implemented in the context menu or as a timeline button. |
Thanks for the clarifications and suggestions @candyface and @scribblemaniac . |
I have had some time to work on it, and have made an update on the PR.
I also thought of the possibility to Duplicate the selected layer, but I wanted to hear your thoughts about that first. It would be a feature that I would make use of - that's for sure. |
Reviewing... |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug:
Application crashes when you undo the process prior to the layers being merged (presumably because it's looking for a layer that's not there anymore) this will have to be fixed. Ideally you should add undo/redo to the behaviour but the current undo/redo system doesn't support that as far as I know and implementing it would be waste of time, considering that I have a much better and extensive undo/redo system waiting to be reviewed and merged too.
To get this approved before my undo/redo rewrite however we would most likely have to clear the undo/redo queue, so if the user decides to merge a layer, then that action will reset the undo/redo queue or ignore the action much like when deleting a layer... it's a ugly solution but I don't see other ways to fix this problem. This would of course require a dialog that explains that the action is destructive and can't be reverted.
UI/UX comments:
The merge behaviour is somewhat unintuitive, you can only select one of the layers, (the upper one in the hierarchy) and merge onto the layer below. Holding down shift and clicking on a layer should highlight it too, to visualize that you want to do an operation across multiple layers.
I have added duplicate layer to the context menu. |
I have added support for merging all visible layers -a feature mentioned in our discussion. |
This feature adresses an issue in the Official Roadmap #540.
It is possible to merge bitmap and vector layers. It is only tested with bitmap layers, and maybe vector layers should be commented out in the code, until the vector layers are useable again.
The feature is only available if there are at least two layers of the correct type in the timeline.