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

Adds specific tools for selection tool #1620

Merged
merged 6 commits into from Jul 10, 2017

Conversation

Projects
None yet
2 participants
@ketanhwr
Contributor

ketanhwr commented Jun 21, 2017

Should the tool buttons be just fine? Because using along with modifiers feels a bit weird.

ketanhwr added some commits Jun 21, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 21, 2017

Owner

Should the tool buttons be just fine? Because using along with modifiers feels a bit weird.

The modifiers should definitely still work. What feels weird about it?

The only difference I noticed with GIMP is that GIMP will lock into a certain mode when a button is clicked, whereas when a modifier is held it will only temporarily switched to that mode. In contract, your patch currently always changes back to the "replace" mode when all modifiers are released. Maybe the locking would make it feel less weird?

Owner

bjorn commented Jun 21, 2017

Should the tool buttons be just fine? Because using along with modifiers feels a bit weird.

The modifiers should definitely still work. What feels weird about it?

The only difference I noticed with GIMP is that GIMP will lock into a certain mode when a button is clicked, whereas when a modifier is held it will only temporarily switched to that mode. In contract, your patch currently always changes back to the "replace" mode when all modifiers are released. Maybe the locking would make it feel less weird?

@ketanhwr

This comment has been minimized.

Show comment
Hide comment
@ketanhwr

ketanhwr Jun 21, 2017

Contributor

Oh I previously misunderstood what you were trying to say. Then I tried out GIMP and got what you meant. The behaviour is similar now, have a look.

Contributor

ketanhwr commented Jun 21, 2017

Oh I previously misunderstood what you were trying to say. Then I tried out GIMP and got what you meant. The behaviour is similar now, have a look.

@bjorn

Yeah, looks fine! I've added two inline comments, and don't forget to initialize mDefaultMode. :-)

Show outdated Hide outdated src/tiled/tileselectiontool.cpp Outdated
Show outdated Hide outdated src/tiled/tileselectiontool.cpp Outdated
Show outdated Hide outdated src/tiled/tileselectiontool.cpp Outdated
Show outdated Hide outdated src/tiled/tileselectiontool.cpp Outdated
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 21, 2017

Owner

Found some nice alternative icons:

https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-break.svg
https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-union.svg
https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-exclude.svg

Only problem is, there is no icon for "intersect", but maybe it won't be too difficult to derive it from these.

Also, as I said on IRC, these buttons should really also be added to the Magic Wand and the Select Same Tile tools. I think a similar approach as done for the Stamp Brush and Fill Tools would work, though actually I had plans to try writing an AbstractSelectionTool anyway...

Owner

bjorn commented Jun 21, 2017

Found some nice alternative icons:

https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-break.svg
https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-union.svg
https://github.com/shimmerproject/elementary-xfce/blob/master/elementary-xfce/actions/22/selection-exclude.svg

Only problem is, there is no icon for "intersect", but maybe it won't be too difficult to derive it from these.

Also, as I said on IRC, these buttons should really also be added to the Magic Wand and the Select Same Tile tools. I think a similar approach as done for the Stamp Brush and Fill Tools would work, though actually I had plans to try writing an AbstractSelectionTool anyway...

@ketanhwr

This comment has been minimized.

Show comment
Hide comment
@ketanhwr

ketanhwr Jun 21, 2017

Contributor

Also, as I said on IRC, these buttons should really also be added to the Magic Wand and the Select Same Tile tools. I think a similar approach as done for the Stamp Brush and Fill Tools would work, though actually I had plans to try writing an AbstractSelectionTool anyway...

So what should I do as of now then?

Contributor

ketanhwr commented Jun 21, 2017

Also, as I said on IRC, these buttons should really also be added to the Magic Wand and the Select Same Tile tools. I think a similar approach as done for the Stamp Brush and Fill Tools would work, though actually I had plans to try writing an AbstractSelectionTool anyway...

So what should I do as of now then?

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 21, 2017

Owner

So what should I do as of now then?

Well, you could introduce the AbstractSelectionTool now, just as way to share the implementation of these tool bar actions. I would later try to merge the move selection tool into it.

Owner

bjorn commented Jun 21, 2017

So what should I do as of now then?

Well, you could introduce the AbstractSelectionTool now, just as way to share the implementation of these tool bar actions. I would later try to merge the move selection tool into it.

ketanhwr added some commits Jul 7, 2017

@bjorn bjorn merged commit 95d998c into bjorn:master Jul 10, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 10, 2017

Owner

Seems like a really nice cleanup of duplicate functionality. Even better now that all selection tools have their selection modes visible!

Owner

bjorn commented Jul 10, 2017

Seems like a really nice cleanup of duplicate functionality. Even better now that all selection tools have their selection modes visible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment