Use wxMilliClock_t to store values returned by wxGetLocalTimeMillis().
This fixes wxComboCtrl compilation with wxUSE_LONGLONG==0 as wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined. See #16939.
This commit is contained in:
committed by
Vadim Zeitlin
parent
a088915a56
commit
d8922744cf
@@ -647,7 +647,7 @@ protected:
|
|||||||
// used to prevent immediate re-popupping in case closed popup
|
// used to prevent immediate re-popupping in case closed popup
|
||||||
// by clicking on the combo control (needed because of inconsistent
|
// by clicking on the combo control (needed because of inconsistent
|
||||||
// transient implementation across platforms).
|
// transient implementation across platforms).
|
||||||
wxLongLong m_timeCanAcceptClick;
|
wxMilliClock_t m_timeCanAcceptClick;
|
||||||
|
|
||||||
// how much popup should expand to the left/right of the control
|
// how much popup should expand to the left/right of the control
|
||||||
wxCoord m_extLeft;
|
wxCoord m_extLeft;
|
||||||
|
@@ -100,7 +100,7 @@ private:
|
|||||||
|
|
||||||
#if wxUSE_COMBOCTRL_POPUP_ANIMATION
|
#if wxUSE_COMBOCTRL_POPUP_ANIMATION
|
||||||
// Popup animation related
|
// Popup animation related
|
||||||
wxLongLong m_animStart;
|
wxMilliClock_t m_animStart;
|
||||||
wxTimer m_animTimer;
|
wxTimer m_animTimer;
|
||||||
wxRect m_animRect;
|
wxRect m_animRect;
|
||||||
int m_animFlags;
|
int m_animFlags;
|
||||||
|
@@ -1918,7 +1918,7 @@ bool wxComboCtrlBase::HandleButtonMouseEvent( wxMouseEvent& event,
|
|||||||
bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event,
|
bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event,
|
||||||
int WXUNUSED(flags) )
|
int WXUNUSED(flags) )
|
||||||
{
|
{
|
||||||
wxLongLong t = ::wxGetLocalTimeMillis();
|
wxMilliClock_t t = ::wxGetLocalTimeMillis();
|
||||||
int evtType = event.GetEventType();
|
int evtType = event.GetEventType();
|
||||||
|
|
||||||
#if USES_WXPOPUPWINDOW || USES_GENERICTLW
|
#if USES_WXPOPUPWINDOW || USES_GENERICTLW
|
||||||
|
@@ -731,10 +731,14 @@ void wxComboCtrl::DoTimerEvent()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLongLong t = ::wxGetLocalTimeMillis();
|
wxMilliClock_t t = ::wxGetLocalTimeMillis();
|
||||||
const wxRect& rect = m_animRect;
|
const wxRect& rect = m_animRect;
|
||||||
|
|
||||||
|
#if wxUSE_LONGLONG
|
||||||
int pos = (int) (t-m_animStart).GetLo();
|
int pos = (int) (t-m_animStart).GetLo();
|
||||||
|
#else
|
||||||
|
int pos = (int) (t-m_animStart);
|
||||||
|
#endif
|
||||||
if ( pos < COMBOBOX_ANIMATION_DURATION )
|
if ( pos < COMBOBOX_ANIMATION_DURATION )
|
||||||
{
|
{
|
||||||
int height = rect.height;
|
int height = rect.height;
|
||||||
|
Reference in New Issue
Block a user