Skip to content
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

Control Click fixes #29

Merged
merged 2 commits into from
Mar 30, 2015
Merged

Conversation

chaosphere2112
Copy link
Contributor

This goes with CDAT/cdat#1163. There are a number of issues with modified clicks in Qt– for one, it reads ctrl + left on a mac as a right click. Presumably to work around this, they map the control modifier to the command button, and the meta modifier to the control button. I originally changed it to use the meta button, but that led me to discover the issue with Qt interpreting ctrl+left as a right click.

Another issue that was happening is that VTK doesn't know how to interpret the Qt Keyboard Modifier objects– it would wind up setting the interactor's ControlKey and ShiftKey attributes to ridiculously high numbers that would evaluate to truth-y, but wouldn't be == True, which was the check I tend to use.

A third issue is that since I now use the command key as a modifier, command clicking inside a cell in the spreadsheet would toggle it to unselected. This was annoying, and it doesn't look like it's actually a useful feature at all, so I just made it so we don't pass the control modifier to the cellActivated function, and instead pass False for the toggle value.

@remram44 @doutriaux1 If you can test this on Ubuntu, that'd be great… my mac is converting the control + left click into a right click before it gets through to my VM, so I'm not certain if it's set up correctly there.

@remram44
Copy link
Contributor

What is the expected behavior here? Can test on Debian.

@chaosphere2112
Copy link
Contributor Author

If you open up the configure menu on a plot, click the left one of the buttons on the top right (if you hover over it, it'll say it will let you add a marker) and click somewhere on the plot, it'll drop a marker; a tooltip will show up in the bottom left of the plot, saying you can press "ctrl + click" to drop another marker. At that point, you should be able to control + leftclick to drop more markers on the plot.

@remram44
Copy link
Contributor

Can't find said button...
cc @vvpalav

@chaosphere2112
Copy link
Contributor Author

Click the pencil button here:
screen shot 2015-03-26 at 9 49 00 am

That should make these show up:
screen shot 2015-03-26 at 9 49 08 am

Click the leftmost of these two:
screen shot 2015-03-26 at 9 49 15 am

Click anywhere on the plot to place the initial marker

This should show up in the bottom left (but should say "Ctrl" for you):
screen shot 2015-03-26 at 9 49 22 am

Ctrl+click on places on the plot, and then more squares should show up. When you click normally on the plot, you'll see dots where the squares were.
screen shot 2015-03-26 at 9 49 32 am

@remram44
Copy link
Contributor

Yep, works as expected! 0d687e6 doesn't: ctrl+click selects/deselects the cell instead.

@chaosphere2112
Copy link
Contributor Author

@remram44 Cool! Are we good to merge?

@chaosphere2112
Copy link
Contributor Author

@remram44 Checking on the status for this... can we go ahead with the merge?

@remram44
Copy link
Contributor

I do not know what else this could affect. Other cell types could be reacting to clicks. What I did test worked.

aashish24 added a commit that referenced this pull request Mar 30, 2015
@aashish24 aashish24 merged commit 77bf4ec into CDAT:uvcdat-master Mar 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants