mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-23 23:49:36 -04:00
Control play/pause buttons in slot of MainWindow via signal in Song class
The engine class as the component instance manager is the wrong place to control the play/pause buttons. Instead emit a signal in the Song class and update the buttons in a slot in MainWindow. This fixes problems with GUI/pixmap operations happening outside the GUI thread when exporting a project. Closes #435.
This commit is contained in:
@@ -146,42 +146,6 @@ void engine::destroy()
|
||||
|
||||
|
||||
|
||||
void engine::updatePlayPauseIcons()
|
||||
{
|
||||
s_songEditor->setPauseIcon( false );
|
||||
s_automationEditor->setPauseIcon( false );
|
||||
s_bbEditor->setPauseIcon( false );
|
||||
s_pianoRoll->setPauseIcon( false );
|
||||
|
||||
if( s_song->isPlaying() )
|
||||
{
|
||||
switch( s_song->playMode() )
|
||||
{
|
||||
case song::Mode_PlaySong:
|
||||
s_songEditor->setPauseIcon( true );
|
||||
break;
|
||||
|
||||
case song::Mode_PlayAutomationPattern:
|
||||
s_automationEditor->setPauseIcon( true );
|
||||
break;
|
||||
|
||||
case song::Mode_PlayBB:
|
||||
s_bbEditor->setPauseIcon( true );
|
||||
break;
|
||||
|
||||
case song::Mode_PlayPattern:
|
||||
s_pianoRoll->setPauseIcon( true );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void engine::updateFramesPerTick()
|
||||
{
|
||||
s_framesPerTick = s_mixer->processingSampleRate() * 60.0f * 4 /
|
||||
|
||||
Reference in New Issue
Block a user