Commit 52d1eb0f authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'rel/0.8.1' into 'v0.8'

Rel/0.8.1

See merge request fsl/fsleyes/widgets!44
parents 90d407cf 5f9e054d
......@@ -25,4 +25,4 @@ if [ "$TEST_STYLE"x != "x" ]; then pylint --output-format=colorized fsleyes_widg
if [ "$TEST_STYLE"x != "x" ]; then exit 0; fi
# Run the tests.
xvfb-run -s "-screen 0 1920x1200x24" python setup.py test
xvfb-run -a -s "-screen 0 1920x1200x24" python setup.py test
......@@ -2,6 +2,18 @@ This document contains the ``fsleyes-widgets`` release history in reverse
chronological order.
0.8.1 (Tuesday September 10th 2019)
-----------------------------------
Fixed
^^^^^
* Fixed a bug in the :class:`.WidgetGrid` where scrolling behaviour was not
being initialised correctly.
0.8.0 (Wednesday August 21st 2019)
----------------------------------
......
......@@ -18,7 +18,7 @@ This file is used to store the current ``fsleyes-widgets`` version.
"""
__version__ = '0.8.0'
__version__ = '0.8.1'
from fsleyes_widgets.utils import (WX_PYTHON, # noqa
......
......@@ -136,8 +136,8 @@ class WidgetGrid(wx.ScrolledWindow):
:arg style: Style flags - can be a combination of ``wx.HSCROLL``,
``wx.VSCROLL``, :data:`WG_SELECTABLE_CELLS`,
:data:`WG_SELECTABLE_ROWS`,
:data:`WG_SELECTABLE_COLUMNS`, and
:data:`WG_DRAGGABLE_COLUMNS`.
:data:`WG_SELECTABLE_COLUMNS`, :data:`WG_KEY_NAVIGATION`,
and :data:`WG_DRAGGABLE_COLUMNS`.
"""
if style is None:
......@@ -158,7 +158,10 @@ class WidgetGrid(wx.ScrolledWindow):
self.__keynav = False
self.__selectable = None
wx.ScrolledWindow.__init__(self, parent, style=wx.WANTS_CHARS)
# clear WG_* flags before passing
# style to ScrolledWindow
style = (style & wx.HSCROLL) | (style & wx.VSCROLL) | wx.WANTS_CHARS
wx.ScrolledWindow.__init__(self, parent, style=style)
hrate = 1 if self.__hscroll else 0
vrate = 1 if self.__vscroll else 0
......
......@@ -145,14 +145,14 @@ def _test_reorder_events():
simmove(sim, cwidget, [0.5, 0.5])
ev = FakeEV(cwidget)
grid._WidgetGrid__onColumnLabelMouseDown(ev)
realYield()
realYield(50)
simmove(sim, dwidget, [droppos, 0.5])
realYield()
realYield(50)
grid._WidgetGrid__onColumnLabelMouseDrag(ev)
realYield()
realYield(50)
ev.evo = dwidget
grid._WidgetGrid__onColumnLabelMouseUp(ev)
realYield()
realYield(50)
explabels = [labels[i] for i in exporder]
gotlabels = grid.GetColLabels()
......@@ -224,14 +224,14 @@ def _test_reorder_events_draglimit():
simmove(sim, cwidget, [0.5, 0.5])
ev = FakeEV(cwidget)
grid._WidgetGrid__onColumnLabelMouseDown(ev)
realYield()
realYield(50)
simmove(sim, dwidget, [droppos, 0.5])
realYield()
realYield(50)
grid._WidgetGrid__onColumnLabelMouseDrag(ev)
realYield()
realYield(50)
ev.evo = dwidget
grid._WidgetGrid__onColumnLabelMouseUp(ev)
realYield()
realYield(50)
explabels = [labels[i] for i in exporder]
gotlabels = grid.GetColLabels()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment