Commit f0d9d6b2 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/interface.cpp: toolbar flickering fix.

parent 29e5c380
...@@ -1082,19 +1082,20 @@ void Interface::TogglePlayButton( int i_playing_status ) ...@@ -1082,19 +1082,20 @@ void Interface::TogglePlayButton( int i_playing_status )
if( i_playing_status == i_old_playing_status ) if( i_playing_status == i_old_playing_status )
return; return;
GetToolBar()->DeleteTool( PlayStream_Event ); wxToolBarToolBase *p_tool = GetToolBar()->FindById( PlayStream_Event );
if( !p_tool ) return;
if( i_playing_status == PLAYING_S ) if( i_playing_status == PLAYING_S )
{ {
GetToolBar()->InsertTool( 2, PlayStream_Event, wxU(_("Pause")), p_tool->SetNormalBitmap( wxBitmap( pause_xpm ) );
wxBitmap( pause_xpm ), wxNullBitmap, p_tool->SetLabel( wxU(_("Pause")) );
wxITEM_NORMAL, wxU(_(HELP_PAUSE)) ); p_tool->SetShortHelp( wxU(_(HELP_PAUSE)) );
} }
else else
{ {
GetToolBar()->InsertTool( 2, PlayStream_Event, wxU(_("Play")), p_tool->SetNormalBitmap( wxBitmap( play_xpm ) );
wxBitmap( play_xpm ), wxNullBitmap, p_tool->SetLabel( wxU(_("Play")) );
wxITEM_NORMAL, wxU(_(HELP_PLAY)) ); p_tool->SetShortHelp( wxU(_(HELP_PLAY)) );
} }
GetToolBar()->Realize(); GetToolBar()->Realize();
......
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