Skip to content

Commit

Permalink
make sure we setup the visualisation preset list prior to init'ing th…
Browse files Browse the repository at this point in the history
…e window. part of xbmc#13556
  • Loading branch information
Jonathan Marshall committed Nov 16, 2012
1 parent 18e10be commit c0e9cc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 8 additions & 10 deletions xbmc/music/dialogs/GUIDialogVisualisationPresetList.cpp
Expand Up @@ -67,16 +67,6 @@ bool CGUIDialogVisualisationPresetList::OnMessage(CGUIMessage &message)
}
}
break;
case GUI_MSG_WINDOW_INIT:
{
CGUIDialog::OnMessage(message);

CGUIMessage msg(GUI_MSG_GET_VISUALISATION, 0, 0);
g_windowManager.SendMessage(msg);
SetVisualisation((CVisualisation*)msg.GetPointer());
return true;
}
break;
case GUI_MSG_WINDOW_DEINIT:
case GUI_MSG_VISUALISATION_UNLOADING:
{
Expand Down Expand Up @@ -122,6 +112,14 @@ void CGUIDialogVisualisationPresetList::FrameMove()
CGUIDialog::FrameMove();
}

void CGUIDialogVisualisationPresetList::OnInitWindow()
{
CGUIMessage msg(GUI_MSG_GET_VISUALISATION, 0, 0);
g_windowManager.SendMessage(msg);
SetVisualisation((CVisualisation*)msg.GetPointer());
CGUIDialog::OnInitWindow();
}

void CGUIDialogVisualisationPresetList::Update()
{
m_vecPresets->Clear();
Expand Down
1 change: 1 addition & 0 deletions xbmc/music/dialogs/GUIDialogVisualisationPresetList.h
Expand Up @@ -38,6 +38,7 @@ class CGUIDialogVisualisationPresetList :
virtual void FrameMove();

protected:
virtual void OnInitWindow();
void SetVisualisation(ADDON::CVisualisation *addon);
void Update();
ADDON::CVisualisation* m_viz; //TODO get rid
Expand Down

0 comments on commit c0e9cc0

Please sign in to comment.