Commit fa94475a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: correctly init loop button state

parent 9a454b6e
......@@ -435,7 +435,8 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
setupButton( loopButton );
loopButton->setToolTip( qtr( "Click to toggle between loop all, loop one and no loop") );
loopButton->setCheckable( true );
loopButton->updateButtonIcons( NORMAL );
int i_state = 2 * var_GetBool( THEPL, "loop" ) + var_GetBool( THEPL, "repeat" );
loopButton->updateButtonIcons( i_state );
CONNECT( THEMIM, repeatLoopChanged( int ), loopButton, updateButtonIcons( int ) );
CONNECT( loopButton, clicked(), THEMIM, loopRepeatLoopStatus() );
widget = loopButton;
......
......@@ -73,8 +73,8 @@ enum {
};
enum { NORMAL, /* loop: 0, repeat: 0 */
REPEAT_ONE,/* loop: 1, repeat: 0 */
REPEAT_ALL,/* loop: 0, repeat: 1 */
REPEAT_ONE,/* loop: 0, repeat: 1 */
REPEAT_ALL,/* loop: 1, repeat: 0 */
};
class IMEvent : public QEvent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment