wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.32k stars 1.79k forks source link

Bug in dialogs sample - wxRearrangeDialog part #25082

Open Wlodzimierz-ABX-Skiba opened 3 weeks ago

Wlodzimierz-ABX-Skiba commented 3 weeks ago

Description

(I'm back to wxW after nearly 20 years so be patient with my out of date way of collaboration. I will try to improve ASAP.)

Bug description:

Broken rename if selection order in wxRearrangeDialog part of dialogs sample is changed.

Expected vs observed behaviour:

When you select item and reorder and rename then you expect selected item to be changed but different nonselected item is changed.

To Reproduce:

Steps to reproduce the behaviour, please make them as detailed as possible. For example:

  1. Start dialogs sample
  2. Select in menu Dialogs->Choices and selectors->Rearrange dialog
  3. Select in list fourth element named "Creation time" so the text field below list shows "Ctime" label and "Creation time" content
  4. Click "Up" button to move selected fourth element to third position
  5. Change text in textfield from "Creation time" to "Creature" and click "Rename" button
  6. In list not selected fourth element "Size" is changed and selected third element is not changed.

Possible reason: In MyRearrangeDialog class the m_sel field does not take into account changes in order by Up and Down buttons but in OnRename method it is taken to GetList()->SetString

Platform and version information