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

Fix for copy action (Ctrl+C) when there is no pager defined in qtconsole #1950

Merged
merged 1 commit into from Jun 13, 2012

Conversation

ccordoba12
Copy link
Member

  • The absence of a pager was generating an ugly traceback when
    trying to copy text and no pager was created.
  • This issue was reported by a Spyder user because all tracebacks
    appear in its internal console, and this one was breaking his workflow.

- The absence of a pager was generating an ugly traceback when
trying to copy text and no pager was created.
@ccordoba12
Copy link
Member Author

How to reproduce the bug:

  1. Run
ipython qtconsole --paging=none
  1. Copy some text
  2. You should see this traceback on the terminal:
Traceback (most recent call last):
  File "IPython/frontend/qt/console/console_widget.py", line 331, in eventFilter
    return self._event_filter_console_keypress(event)
  File "IPython/frontend/qt/console/frontend_widget.py", line 302, in _event_filter_console_keypress
    return super(FrontendWidget, self)._event_filter_console_keypress(event)
  File "IPython/frontend/qt/console/console_widget.py", line 1029, in _event_filter_console_keypress
    self.copy()
  File "IPython/frontend/qt/console/frontend_widget.py", line 181, in copy
    if self._page_control.hasFocus():
AttributeError: 'NoneType' object has no attribute 'hasFocus'

@minrk
Copy link
Member

minrk commented Jun 13, 2012

Simple enough, thanks!

minrk added a commit that referenced this pull request Jun 13, 2012
Fix for copy action (Ctrl+C) when there is no pager defined in qtconsole
@minrk minrk merged commit 99373b4 into ipython:master Jun 13, 2012
@ccordoba12
Copy link
Member Author

Ok, thanks! We'll keep you posted (hopefully with more PRs :-) if we find more bugs on our side.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Fix for copy action (Ctrl+C) when there is no pager defined in qtconsole
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.

None yet

2 participants