From bea0403d2c541d405bbcfd52aa837914fdac2aa2 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 27 Apr 2020 13:13:02 +0930 Subject: [PATCH] GLideNUI-wtl: Make sure clearing of selected font on load --- src/GLideNUI-wtl/GLideNUI.rc | Bin 53284 -> 53324 bytes src/GLideNUI-wtl/config-osd.cpp | 10 ++++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/GLideNUI-wtl/GLideNUI.rc b/src/GLideNUI-wtl/GLideNUI.rc index b96fd60284df9e09ad6551acd7f56c74112e57da..e1dbb1b10480ba56d3d57a6a034514abf274c187 100644 GIT binary patch delta 40 tcmZ3ofceY<<_!VUC4(6}82lN+8G;#H8GINVfjAsUMlu9%cAWm$0s!t33j+WE delta 14 WcmX@JfO*LR<_!VUH&;x*VgUd(9|s%& diff --git a/src/GLideNUI-wtl/config-osd.cpp b/src/GLideNUI-wtl/config-osd.cpp index bb3c3d88..b1e8bc80 100644 --- a/src/GLideNUI-wtl/config-osd.cpp +++ b/src/GLideNUI-wtl/config-osd.cpp @@ -106,14 +106,16 @@ void COsdTab::SelCurrentFont(void) tv.item.cchTextMax = sizeof(Item) / sizeof(Item[0]); tv.item.hItem = m_Fonts.GetChildItem(TVI_ROOT); HTREEITEM hCurrentItem = NULL; - while (hCurrentItem == NULL && tv.item.hItem) { + while (tv.item.hItem) { m_Fonts.GetItem(&tv.item); - HTREEITEM hChild = m_Fonts.GetChildItem(tv.item.hItem); + m_Fonts.SetItemState(tv.item.hItem, 0, TVIF_STATE | TVIS_SELECTED); + HTREEITEM hChild = m_Fonts.GetChildItem(tv.item.hItem); HTREEITEM NextItem = m_Fonts.GetNextSiblingItem(tv.item.hItem); - if (hCurrentItem == NULL && hChild != NULL) { + if (hChild != NULL) { tv.item.hItem = hChild; - while (hCurrentItem == NULL && tv.item.hItem) { + while (tv.item.hItem) { m_Fonts.GetItem(&tv.item); + m_Fonts.SetItemState(tv.item.hItem, 0, TVIF_STATE | TVIS_SELECTED); if (Item == CurrentFile) hCurrentItem = tv.item.hItem; tv.item.hItem = m_Fonts.GetNextSiblingItem(tv.item.hItem);