From: <rel...@us...> - 2009-03-30 22:41:23
|
Revision: 252 http://modplug.svn.sourceforge.net/modplug/?rev=252&view=rev Author: relabsoluness Date: 2009-03-30 22:41:07 +0000 (Mon, 30 Mar 2009) Log Message: ----------- Instrument tuning related changes: . Creating 'group geometric' was broken. / Return-key won't now close the dialog. / Added index in front of note names. / groupsize and groupratio edits are now enabled with general types. Modified Paths: -------------- trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp trunk/OpenMPT/soundlib/tuningbase.cpp Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2009-03-07 21:24:44 UTC (rev 251) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2009-03-30 22:41:07 UTC (rev 252) @@ -273,8 +273,8 @@ } else //case: m_pActiveTuning is of type general. { - m_EditSteps.EnableWindow(false); - m_EditRatioPeriod.EnableWindow(false); + //m_EditSteps.EnableWindow(false); + //m_EditRatioPeriod.EnableWindow(false); } m_EditRatioPeriod.Invalidate(); @@ -1293,6 +1293,17 @@ } +void CTuningDialog::OnOK() +//------------------------ +{ + // Prevent return-key from closing the window. + if(GetKeyState(VK_RETURN) <= -127) + return; + else + CDialog::OnOK(); +} + + //////////////////////////////////////////////////////// //*************** //CTuningTreeCtrl Modified: trunk/OpenMPT/mptrack/TuningDialog.h =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.h 2009-03-07 21:24:44 UTC (rev 251) +++ trunk/OpenMPT/mptrack/TuningDialog.h 2009-03-30 22:41:07 UTC (rev 252) @@ -321,6 +321,7 @@ void DoErrorExit(); + virtual void OnOK(); //Treectrl context menu functions. public: Modified: trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp =================================================================== --- trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp 2009-03-07 21:24:44 UTC (rev 251) +++ trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp 2009-03-30 22:41:07 UTC (rev 252) @@ -64,9 +64,12 @@ const bool isValidNote = m_pTuning->IsValidNote(noteToDraw); string temp; - if(isValidNote) temp = m_pTuning->GetNoteName(noteToDraw); + if(isValidNote) + { + temp = "(" + Stringify(noteToDraw) + ") " + m_pTuning->GetNoteName(noteToDraw); + } - if(isValidNote && temp.size() < sizeofS) + if(isValidNote && temp.size()+1 < sizeofS) wsprintf(s, "%s", temp.c_str()); else wsprintf(s, "%s", "..."); Modified: trunk/OpenMPT/soundlib/tuningbase.cpp =================================================================== --- trunk/OpenMPT/soundlib/tuningbase.cpp 2009-03-07 21:24:44 UTC (rev 251) +++ trunk/OpenMPT/soundlib/tuningbase.cpp 2009-03-30 22:41:07 UTC (rev 252) @@ -431,7 +431,7 @@ return true; if(m_TuningType == TT_GROUPGEOMETRIC) - return CreateGroupGeometric(s, GetGroupRatio(), GetValidityRange().first); + return CreateGroupGeometric(s, GetGroupRatio(), 0); if(m_TuningType == TT_GEOMETRIC) return CreateGeometric(s, GetGroupRatio()); @@ -448,7 +448,7 @@ return true; if(m_TuningType == TT_GROUPGEOMETRIC) - return CreateGroupGeometric(GetGroupSize(), r, GetValidityRange().first); + return CreateGroupGeometric(GetGroupSize(), r, 0); if(m_TuningType == TT_GEOMETRIC) return CreateGeometric(GetGroupSize(), r); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |