Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
gparker

Ctrl+Click unselects on second click? Shift+Click doesn't

Recommended Posts

I don't see anything in the documentation about this, but it appears that when you Shift+Click things, it only adds them to the selection.

 

However, if you Ctrl+Click is can also remove the item from the selection on the second click.

 

Is this intentional? I wanted Shift and Ctrl to have the same behavior and this is an issue since currently, they don't.

Link to comment
Share on other sites

Yep, that is intentional. It works just like in most operating systems when you're selecting things. SHIFT only adds, but CTRL toggles. You're welcome to edit the source to get the behavior you want, though.

Link to comment
Share on other sites

I found where this happens in the TransformManager....

 

happens at this function

private function onMouseDownItem($e:TransformEvent):void {

if (isKeyDown(Keyboard.CONTROL)) {

 

So, I just took out that part and it works as expected... with no deselect. or, I could have added in something like

if (isKeyDown(Keyboard.CONTROL) || isKeyDown(Keyboard.SHIFT)) {

to make them work the same way.

 

I can only assume that someone had a request to deselect items from the selection Via CTRL second click, but you might want to add that to the documentation or set it as an option, since some developers may not be aware that this will happen (documentation lead me to believe that SHIFT and CTRL keys would have the same behavior). If you have a good QA department, they WILL find out that this happens and raise a defect about it being unexpected behavior :(

Link to comment
Share on other sites

Thanks, I'll mention it in the docs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×