mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Allow Py-like reverse indexing of wxList
This commit is contained in:
@@ -873,9 +873,12 @@ public:
|
||||
sipRes = sipCpp->size();
|
||||
%End
|
||||
|
||||
{ItemClass}* __getitem__(ulong index);
|
||||
{ItemClass}* __getitem__(long index);
|
||||
%MethodCode
|
||||
if (index < sipCpp->size()) {{
|
||||
if (0 > index)
|
||||
index += sipCpp->size();
|
||||
|
||||
if (index < sipCpp->size() && (0 <= index)) {{
|
||||
{ListClass}::compatibility_iterator node = sipCpp->Item(index);
|
||||
if (node)
|
||||
sipRes = ({ItemClass}*)node->GetData();
|
||||
|
||||
Reference in New Issue
Block a user