Opened 4 years ago

Closed 4 years ago

#11646 closed defect (fixed)

Notebook.ChangeSelection returns the new page instead of the old

Reported by: Grashopa Owned by:
Priority: normal Milestone:
Component: wxMSW Version: stable-latest
Keywords: wxNotebook ChangeSelection Cc:
Blocked By: Blocking:
Patch: yes

Description

int wx.NoteBook.ChangeSelection(page) should return the old page, however it returns the new page instead.

I've attached a patch, but I don't know how to build wxWidgets and this was my first use of SVN.

Attachments (2)

changeselection.patch download (611 bytes) - added by Grashopa 4 years ago.
Patch of msw/notebook.cpp
ChangeSelectionBug.py download (1.3 KB) - added by Grashopa 4 years ago.
wxPython app showing the bug when doing File->New

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by Grashopa

Patch of msw/notebook.cpp

Changed 4 years ago by Grashopa

wxPython app showing the bug when doing File->New

comment:1 Changed 4 years ago by vadz

  • Status changed from new to confirmed

Thanks for your patch, this is indeed the right thing to do and I'll apply it soon.

For the future please try to compile the code you change as while I could fix the compilation of this patch easily, this might not be as simple for more complex patches. Also, please make patches from the top wx directory or its parent as explained in HowToSubmitPatches.

TIA!

comment:2 Changed 4 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [63219]) Return old, not new, selection from wxMSW wxNotebook::ChangeSelection().

The function is documented to return the old selection and not the new one, so
correct it to behave as expected.

Closes #11646.

Note: See TracTickets for help on using tickets.