From: <sv...@op...> - 2024-07-25 20:46:47
|
Author: sagamusix Date: Thu Jul 25 22:46:35 2024 New Revision: 21290 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21290 Log: Merged revision(s) 21289 from trunk/OpenMPT: [Fix] Tree view: Remove keyboard focus if tree view is about to be hidden (https://bugs.openmpt.org/view.php?id=1802). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/Mainbar.cpp branches/OpenMPT-1.31/mptrack/Mainbar.h Modified: branches/OpenMPT-1.31/mptrack/Mainbar.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Mainbar.cpp Thu Jul 25 22:45:45 2024 (r21289) +++ branches/OpenMPT-1.31/mptrack/Mainbar.cpp Thu Jul 25 22:46:35 2024 (r21290) @@ -1,7 +1,7 @@ /* * Mainbar.cpp * ----------- - * Purpose: Implementation of OpenMPT's window toolbar. + * Purpose: Implementation of OpenMPT's window toolbar and parent container of the tree view. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. @@ -878,6 +878,14 @@ } +void CModTreeBar::DelayShow(BOOL show) +{ + if(!show && IsChild(GetFocus())) + CMainFrame::GetMainFrame()->SetFocus(); + CDialogBar::DelayShow(show); +} + + void CModTreeBar::RefreshDlsBanks() { if(m_pModTree) m_pModTree->RefreshDlsBanks(); Modified: branches/OpenMPT-1.31/mptrack/Mainbar.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/Mainbar.h Thu Jul 25 22:45:45 2024 (r21289) +++ branches/OpenMPT-1.31/mptrack/Mainbar.h Thu Jul 25 22:46:35 2024 (r21290) @@ -1,7 +1,7 @@ /* * Mainbar.h * --------- - * Purpose: Implementation of OpenMPT's window toolbar. + * Purpose: Implementation of OpenMPT's window toolbar and parent container of the tree view. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. @@ -153,6 +153,8 @@ CModTreeBar(); ~CModTreeBar() override; + void DelayShow(BOOL show) override; + public: void Init(); void RecalcLayout(); |