Use in wxPG classes wxMilliClock_t variables to store values returned by wxGetLocalTimeMillis() function.
wxMilliClock_t is always mapped to the proper base type and hence can be used even if wxLongLong type is not defined (when wxUSE_LONGLONG is disabled).
This commit is contained in:
		@@ -1815,7 +1815,7 @@ protected:
 | 
			
		||||
    wxBitmap            *m_doubleBuffer;
 | 
			
		||||
 | 
			
		||||
    /** Local time ms when control was created. */
 | 
			
		||||
    wxLongLong          m_timeCreated;
 | 
			
		||||
    wxMilliClock_t      m_timeCreated;
 | 
			
		||||
 | 
			
		||||
    /** wxPGProperty::OnEvent can change value by setting this. */
 | 
			
		||||
    wxVariant           m_changeInEventValue;
 | 
			
		||||
@@ -2025,7 +2025,7 @@ protected:
 | 
			
		||||
    wxWindow*           m_tlpClosed;
 | 
			
		||||
 | 
			
		||||
    // Local time ms when tlp was closed.
 | 
			
		||||
    wxLongLong          m_tlpClosedTime;
 | 
			
		||||
    wxMilliClock_t      m_tlpClosedTime;
 | 
			
		||||
 | 
			
		||||
    // Sort function
 | 
			
		||||
    wxPGSortCallback    m_sortFunction;
 | 
			
		||||
 
 | 
			
		||||
@@ -535,7 +535,7 @@ protected:
 | 
			
		||||
 | 
			
		||||
    void OnMouseEvent( wxMouseEvent& event )
 | 
			
		||||
    {
 | 
			
		||||
        wxLongLong t = ::wxGetLocalTimeMillis();
 | 
			
		||||
        wxMilliClock_t t = ::wxGetLocalTimeMillis();
 | 
			
		||||
        int evtType = event.GetEventType();
 | 
			
		||||
 | 
			
		||||
        if ( m_property->HasFlag(wxPG_PROP_USE_DCC) &&
 | 
			
		||||
@@ -560,7 +560,7 @@ protected:
 | 
			
		||||
                {
 | 
			
		||||
                    if ( m_downReceived || m_timeLastMouseUp == 1 )
 | 
			
		||||
                    {
 | 
			
		||||
                        wxLongLong timeFromLastUp = (t-m_timeLastMouseUp);
 | 
			
		||||
                        wxMilliClock_t timeFromLastUp = (t-m_timeLastMouseUp);
 | 
			
		||||
 | 
			
		||||
                        if ( timeFromLastUp < DOUBLE_CLICK_CONVERSION_TRESHOLD )
 | 
			
		||||
                        {
 | 
			
		||||
@@ -586,7 +586,7 @@ protected:
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    wxLongLong                  m_timeLastMouseUp;
 | 
			
		||||
    wxMilliClock_t              m_timeLastMouseUp;
 | 
			
		||||
    wxOwnerDrawnComboBox*       m_combo;
 | 
			
		||||
    wxPGProperty*               m_property;  // Selected property
 | 
			
		||||
    bool                        m_downReceived;
 | 
			
		||||
 
 | 
			
		||||
@@ -1213,7 +1213,7 @@ void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )
 | 
			
		||||
    if ( newTLP == m_tlp )
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    wxLongLong currentTime = ::wxGetLocalTimeMillis();
 | 
			
		||||
    wxMilliClock_t currentTime = ::wxGetLocalTimeMillis();
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    // Parent changed so let's redetermine and re-hook the
 | 
			
		||||
 
 | 
			
		||||
@@ -392,7 +392,7 @@ void wxPropertyGridPageState::OnClientWidthChange( int newWidth, int widthChange
 | 
			
		||||
 | 
			
		||||
        if ( !m_isSplitterPreSet && m_dontCenterSplitter )
 | 
			
		||||
        {
 | 
			
		||||
            long timeSinceCreation = (::wxGetLocalTimeMillis() - GetGrid()->m_timeCreated).ToLong();
 | 
			
		||||
             wxMilliClock_t timeSinceCreation = ::wxGetLocalTimeMillis() - GetGrid()->m_timeCreated;
 | 
			
		||||
 | 
			
		||||
            // If too long, don't set splitter
 | 
			
		||||
            if ( timeSinceCreation < 250 )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user