to keep the items in a wxListCtrl sorted, I'm calling wxListCtrl::SortItems in a handler for wxEVT_COMMAND_LIST_INSERT_ITEM or wxEVT_COMMAND_LIST_DELETE_ITEM. This works fine on Windows, but throws the following assertion in Linux with GTK2:
Code: Select all
../src/generic/listctrl.cpp(4473): assert "IsEmpty() || (m_lineFrom <= m_lineTo && m_lineTo < GetItemCount())" failed in GetVisibleLinesRange(): GetVisibleLinesRange() returns incorrect result
../src/generic/listctrl.cpp(4473): assert "IsEmpty() || (m_lineFrom <= m_lineTo && m_lineTo < GetItemCount())" failed in GetVisibleLinesRange(): GetVisibleLinesRange() returns incorrect result
Question: Is calling wxListCtrl::SortItems from an event handler forbidden? Or is this a bug in the GTK2 implementation?
The wxwidgets version on Linux is:
Code: Select all
dpkg --status libwxgtk3.0-0v5:amd64
Package: libwxgtk3.0-0v5
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 16463
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: wxwidgets3.0
Version: 3.0.4+dfsg-3
Replaces: libwxgtk3.0-0
Depends: libc6 (>= 2.15), libcairo2 (>= 1.6.0), libgcc1 (>= 1:3.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libgl1, libglib2.0-0 (>= 2.24.0), libgtk2.0-0 (>= 2.24.0), libjpeg8 (>= 8c), libnotify4 (>= 0.7.0), libpango-1.0-0 (>= 1.18.0), libpangocairo-1.0-0 (>= 1.14.0), libpng16-16 (>= 1.6.2-1), libsm6, libstdc++6 (>= 5.2), libtiff5 (>= 4.0.3), libwxbase3.0-0v5 (>= 3.0.4+dfsg), libx11-6, libxxf86vm1
Breaks: libwxgtk3.0-0
Description: wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
wxWidgets (formerly known as wxWindows) is a class library for C++ providing
GUI components and other facilities on several popular platforms (and some
unpopular ones as well).
.
This package provides the shared libraries needed to run programs linked
against wxWidgets. To use the (optional) glcanvas library you will need
to have Mesa or OpenGL installed.
Original-Maintainer: wxWidgets Maintainers <[email protected]>
Homepage: https://www.wxwidgets.org/
J.