Ticket #14742 (infoneeded_new defect)

Opened 7 months ago

Last modified 7 months ago

wxSpinCtrl::SetValue(const wxString&) doesn't update m_oldValue (internal counter) in wxMSW

Reported by: staticinline Owned by:
Priority: normal Milestone:
Component: wxMSW Version: 2.9-svn
Keywords: Cc:
Blocked By: Patch: no
Blocking:

Description

wxSpinCtrl::SetValue(const wxString&) doesn't (but should) update m_oldValue like wxSpinCtrl::SetValue(int val) does, under wxMSW.

The actual problem I observed was that SendSpinUpdate was sometimes not triggered from wxSpinCtrl::MSWOnScroll due to m_oldValue != new_value being incorrectly false following a call to wxSpinCtrl::SetValue(const wxString&). I changed my own code to use wxSpinCtrl::SetValue(int val), which fixes it for me and is better, but others may still run into the problem.

Change History

Changed 7 months ago by staticinline

Also, the problem previously didn't occur for me in 2.8.

Changed 7 months ago by vadz

  • status changed from new to infoneeded_new
  • milestone deleted

Could you please provide a minimal patch to a sample reproducing the problem? Or perhaps it can already be reproduced in the spin page of the widgets sample? If so, could you please clearly explain

  1. What do you do.
  2. What do you expect to happen.
  3. What actually happens.

TIA!

Note: See TracTickets for help on using tickets.