From: <sag...@us...> - 2009-12-20 01:10:59
|
Revision: 445 http://modplug.svn.sourceforge.net/modplug/?rev=445&view=rev Author: saga-games Date: 2009-12-20 01:10:47 +0000 (Sun, 20 Dec 2009) Log Message: ----------- [Fix] Pattern Editor: Search&Replace didn't create an undo point. [Fix] Orderlist: Sequence sub menu (in context menu) was not destroyed properly. [Imp] Instrument Editor: When creating a new envelope, automatically enable it as well. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_pat.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-18 21:51:37 UTC (rev 444) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2009-12-20 01:10:47 UTC (rev 445) @@ -1047,6 +1047,8 @@ AppendMenu(menuSequence, MF_STRING, ID_SEQUENCE_ITEM + MAX_SEQUENCES, TEXT("Create new sequence")); if (pSndFile->Order.GetNumSequences() > 1) AppendMenu(menuSequence, MF_STRING, ID_SEQUENCE_ITEM + MAX_SEQUENCES + 1, TEXT("Delete current sequence")); + + ::DestroyMenu(menuSequence); } } AppendMenu(hMenu, MF_SEPARATOR, NULL, ""); Modified: trunk/OpenMPT/mptrack/Undo.cpp =================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp 2009-12-18 21:51:37 UTC (rev 444) +++ trunk/OpenMPT/mptrack/Undo.cpp 2009-12-20 01:10:47 UTC (rev 445) @@ -35,8 +35,8 @@ // - pattern: Pattern of which an undo step should be created from. // - x: first channel // - y: first row -// - cx: last channel -// - cy: last row +// - cx: width +// - cy: height bool CPatternUndo::PrepareUndo(PATTERNINDEX pattern, UINT x, UINT y, UINT cx, UINT cy) //------------------------------------------------------------------------------------ { Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2009-12-18 21:51:37 UTC (rev 444) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2009-12-20 01:10:47 UTC (rev 445) @@ -1039,6 +1039,7 @@ envelope->Ticks[0] = 0; envelope->Values[0] = cDefaultValue; envelope->nNodes = 1; + envelope->dwFlags |= ENV_ENABLED; } UINT i = 0; for (i = 0; i < envelope->nNodes; i++) if (nTick <= envelope->Ticks[i]) break; Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-18 21:51:37 UTC (rev 444) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-20 01:10:47 UTC (rev 445) @@ -1847,6 +1847,8 @@ } if (bReplace) { + pModDoc->GetPatternUndo()->PrepareUndo(nPat, n % pSndFile->m_nChannels, n / pSndFile->m_nChannels, 1, 1); + if ((m_dwReplaceFlags & PATSEARCH_NOTE)) { // -1 octave This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |