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

In the Editor, tab does not switch when ctrl is released and focus remains on the tab_switcher #4763

Closed
jnsebgosselin opened this issue Jul 18, 2017 · 5 comments

Comments

@jnsebgosselin
Copy link
Member

Description of your problem

What steps will reproduce the problem?

  1. While focus is in the Editor, hold ctrl key and click Tab.
  2. Release ctrl key

What is the expected output? What do you see instead?

Expected output: When ctrl key is released, Editor tab should change to the one selected and tab_switcher should close.

Actual output: When ctrl key is released, Editor tab does not change and focus remains on the tab_switcher. A mouse double-click on the tab_switcher is required for it to switch tab and to close.

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.2.0.dev0
  • Python Version: 3.6.1
  • Qt Version: 4.8.7
  • PyQt Version: 4.11.4
  • Operating system: Win7 64bits

Dependencies

IPython >=4.0 : 6.1.0 (OK)
cython >=0.21 : None (NOK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
numpy >=1.7 : 1.13.0 (OK)
pandas >=0.13.1 : None (NOK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.1 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.6.2 (OK)
sympy >=0.7.3 : None (NOK)

tab_switcher

@ccordoba12
Copy link
Member

@jnsebgosselin, you're going to work on this one, right?

@jnsebgosselin
Copy link
Member Author

Yes, I have a PR on the way. I fixed this while working on issue #2419

@rlaverde
Copy link
Member

Did you test with the latest 3.x branch?
Ir seems related to #4631

@jnsebgosselin
Copy link
Member Author

jnsebgosselin commented Jul 18, 2017

@rlaverde Yes, this was with the latest 3.x branch.

I think what is happening is that the ctrl key_release event is accepted by EditorStack in keyReleaseEvent method and is not forwarded to EditorStack where the tab_switching is handled.

Maybe there is a better way than installing an eventFilter in EditorStack to solve this issue. I think this will also affect the way this feature request (#2419) could be implemented.

@jnsebgosselin
Copy link
Member Author

Ok, I've found another way to solve this issue that is better I think. We can add event.ignore() in keyReleaseEvent method of CodeEditor class so that the event is propagated to the parent. I think it is a better approach than using an eventFilter in the parent.

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

No branches or pull requests

3 participants