Changeset 2b208ebcf0f53764dee625dc91edd9f6ba3cedaf

Show
Ignore:
Timestamp:
04/25/04 17:04:45 (4 years ago)
Author:
Cyril Deguet <asmax@videolan.org>
git-committer:
Cyril Deguet <asmax@videolan.org> 1082905485 +0000
git-parent:

[3ef2227a289c65c86c5e09f272b166977c66ac77]

git-author:
Cyril Deguet <asmax@videolan.org> 1082905485 +0000
Message:
  • ctrl_text.cpp: put the control text in the "moving" state initially
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/skins2/controls/ctrl_text.cpp

    r5bbca7b r2b208eb  
    8181 
    8282    // Initial state 
    83     m_fsm.setState( "outStill" ); 
     83    m_fsm.setState( "moving" ); 
    8484 
    8585    // Observe the variable 
     
    211211    m_xPos = 0; 
    212212 
    213     // If the control was in the moving state, check if the scrolling is 
    214     // still necessary 
    215     const string &rState = m_fsm.getState(); 
    216     if( rState == "moving" || rState == "outMoving" ) 
    217     { 
    218         if( m_pImg && m_pImg->getWidth() >= getPosition()->getWidth()
     213    if( getPosition() ) 
     214    { 
     215        // If the control was in the moving state, check if the scrolling is 
     216        // still necessary 
     217        const string &rState = m_fsm.getState(); 
     218        if( rState == "moving" || rState == "outMoving"
    219219        { 
    220             m_pCurrImg = m_pImgDouble; 
    221             m_pTimer->start( MOVING_TEXT_DELAY, false ); 
     220            if( m_pImg && m_pImg->getWidth() >= getPosition()->getWidth() ) 
     221            { 
     222                m_pCurrImg = m_pImgDouble; 
     223                m_pTimer->start( MOVING_TEXT_DELAY, false ); 
     224            } 
     225            else 
     226            { 
     227                m_pTimer->stop(); 
     228            } 
    222229        } 
    223         else 
    224         { 
    225             m_pTimer->stop(); 
    226         } 
    227     } 
    228  
    229     notifyLayout(); 
     230        notifyLayout(); 
     231    } 
    230232} 
    231233