From: <sag...@us...> - 2012-07-17 21:08:48
|
Revision: 1329 http://modplug.svn.sourceforge.net/modplug/?rev=1329&view=rev Author: saga-games Date: 2012-07-17 21:08:41 +0000 (Tue, 17 Jul 2012) Log Message: ----------- [Imp] Quick Channel Settings are now always hidden when changing focus to another window, not only when switching back to the lower pattern view. [Fix] Fixed memory leak that occoured when trying to load invalid/missing plugins (e.g. on startup). [Mod] OpenMPT: Version is now 1.20.02.02 Modified Paths: -------------- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/version.h Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2012-07-17 21:08:15 UTC (rev 1328) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2012-07-17 21:08:41 UTC (rev 1329) @@ -14,7 +14,6 @@ #include "Mainfrm.h" #include "PatternEditorDialogs.h" #include "view_pat.h" -#include "../muParser/include/muParser.h" // -> CODE#0010 @@ -1610,7 +1609,8 @@ // Show channel properties from pattern editor BEGIN_MESSAGE_MAP(QuickChannelProperties, CDialog) - ON_WM_HSCROLL() // Sliders + ON_WM_HSCROLL() // Sliders + ON_WM_ACTIVATE() // Catch Window focus change ON_EN_UPDATE(IDC_EDIT1, OnVolChanged) ON_EN_UPDATE(IDC_EDIT2, OnPanChanged) ON_EN_UPDATE(IDC_EDIT3, OnNameChanged) @@ -1645,6 +1645,8 @@ panSlider.SetRange(0, 64); panSlider.SetTicFreq(8); panSpin.SetRange(0, 256); + + nameEdit.SetFocus(); }; @@ -1655,6 +1657,17 @@ } +void QuickChannelProperties::OnActivate(UINT nState, CWnd *, BOOL) +//---------------------------------------------------------------- +{ + if(nState == WA_INACTIVE) + { + // Hide window when changing focus to another window. + visible = false; + ShowWindow(SW_HIDE); + } +} + // Show channel properties for a given channel at a given screen position. void QuickChannelProperties::Show(CModDoc *modDoc, CHANNELINDEX chn, PATTERNINDEX ptn, CPoint position) //----------------------------------------------------------------------------------------------------- @@ -1735,14 +1748,6 @@ } -void QuickChannelProperties::Hide() -//--------------------------------- -{ - visible = false; - ShowWindow(SW_HIDE); -} - - void QuickChannelProperties::OnVolChanged() //----------------------------------------- { Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.h =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2012-07-17 21:08:15 UTC (rev 1328) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2012-07-17 21:08:41 UTC (rev 1329) @@ -360,7 +360,6 @@ ~QuickChannelProperties(); void Show(CModDoc *modDoc, CHANNELINDEX chn, PATTERNINDEX ptn, CPoint position); - void Hide(); protected: virtual void DoDataExchange(CDataExchange* pDX); @@ -368,6 +367,7 @@ void UpdateDisplay(); void PrepareUndo(); + afx_msg void OnActivate(UINT nState, CWnd *, BOOL); afx_msg void OnVolChanged(); afx_msg void OnPanChanged(); afx_msg void OnHScroll(UINT, UINT, CScrollBar *); Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2012-07-17 21:08:15 UTC (rev 1328) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2012-07-17 21:08:41 UTC (rev 1329) @@ -769,7 +769,6 @@ CScrollView::OnSetFocus(pOldWnd); m_dwStatus |= psFocussed; InvalidateRow(); - quickChannelProperties.Hide(); CModDoc *pModDoc = GetDocument(); if (pModDoc) { @@ -795,9 +794,10 @@ InvalidateRow(); } + //rewbs.customKeys void CViewPattern::OnGrowSelection() -//----------------------------------- +//---------------------------------- { CSoundFile *pSndFile = GetSoundFile(); if(pSndFile == nullptr) Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2012-07-17 21:08:15 UTC (rev 1328) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2012-07-17 21:08:41 UTC (rev 1329) @@ -369,7 +369,7 @@ HINSTANCE hLib; bool validPlug = false; - VSTPluginLib *p = nullptr; + VSTPluginLib *p; try { p = new VSTPluginLib(pszDllPath); @@ -445,6 +445,9 @@ CMainFrame::WritePrivateProfileCString(cacheSection, IDs, pszDllPath, cacheFile); CMainFrame::WritePrivateProfileCString(cacheSection, p->szLibraryName, IDs, cacheFile); CMainFrame::WritePrivateProfileLong(cacheSection, flagsKey, p->EncodeCacheFlags(), cacheFile); + } else + { + delete p; } return (validPlug ? m_pVstHead : nullptr); Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-07-17 21:08:15 UTC (rev 1328) +++ trunk/OpenMPT/mptrack/version.h 2012-07-17 21:08:41 UTC (rev 1329) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 02 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |