You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very simple Matplotlib program using widgets.RadioButton loses mouse clicks - or stores them till the next click - but only when Python > Preferences > Run is set to
(0) Execute in current Python or IPython console
the problem disappears if you select either
(0) Execute in a new dedicated Python console
...or...
(0) Execute in an external System terminal
When the problem occurs, the original terminal where I typed "spyder&" to launch spyder reports...
QTextCursor::setPosition: Position '9913' out of range
QTextCursor::setPosition: Position '9938' out of range
QTextCursor::setPosition: Position '9608' out of range
QTextCursor::setPosition: Position '9645' out of range
QTextCursor::setPosition: Position '9670' out of range
...
for each postponed mouse click.
What steps will reproduce the problem?
Run this simple RadioButton script that selects Sex M or F.
import matplotlib.pyplot as plt
from matplotlib.widgets import RadioButtons
fig = plt.figure()
ax = plt.axes([.4, .4, .2, .3])
plt.title('Sex')
# Radio buttons in ax
radioSex = RadioButtons(ax, ['Male', 'Female'])
def sexfunc(label):
print 'In sexfunc()'
sexdict = {'Male':'M', 'Female':'F'}
sex = sexdict[label]
print ' sex = %r'%sex
radioSex.on_clicked(sexfunc)
plt.show()
What is the expected output? What do you see instead?
With the proper Run selection every time you click "Male" or "Female" the console shows your selection immediately.
In sexfunc()
sex = 'M'
In sexfunc()
sex = 'F'
With the wrong Run selection the first click is ignored (nothing is printed), then the second click shows the result of the first click, and from there it is always one click behind.
For example the initial default selection is Male. I click Female and nothing happens. Then I click Male and it reports "sex = 'F'". I click back to Female and it reports "sex = 'M'", and so forth.
It is like it buffers the click and releases it only on the next click, always one step behind.
Please provide any additional information below
Version and main components
Spyder Version: 2.3.7
Python Version: 2.7.10
Qt Versions: 4.8.7, PyQt4 (API v2) 4.11.4 on Darwin
Description
A very simple Matplotlib program using widgets.RadioButton loses mouse clicks - or stores them till the next click - but only when Python > Preferences > Run is set to
(0) Execute in current Python or IPython console
the problem disappears if you select either
(0) Execute in a new dedicated Python console
...or...
(0) Execute in an external System terminal
When the problem occurs, the original terminal where I typed "spyder&" to launch spyder reports...
QTextCursor::setPosition: Position '9913' out of range
QTextCursor::setPosition: Position '9938' out of range
QTextCursor::setPosition: Position '9608' out of range
QTextCursor::setPosition: Position '9645' out of range
QTextCursor::setPosition: Position '9670' out of range
...
for each postponed mouse click.
What steps will reproduce the problem?
Run this simple RadioButton script that selects Sex M or F.
What is the expected output? What do you see instead?
With the proper Run selection every time you click "Male" or "Female" the console shows your selection immediately.
With the wrong Run selection the first click is ignored (nothing is printed), then the second click shows the result of the first click, and from there it is always one click behind.
For example the initial default selection is Male. I click Female and nothing happens. Then I click Male and it reports "sex = 'F'". I click back to Female and it reports "sex = 'M'", and so forth.
It is like it buffers the click and releases it only on the next click, always one step behind.
Please provide any additional information below
Version and main components
Optional dependencies
The text was updated successfully, but these errors were encountered: