|
From: <sag...@us...> - 2010-03-14 14:26:47
|
Revision: 531
http://modplug.svn.sourceforge.net/modplug/?rev=531&view=rev
Author: saga-games
Date: 2010-03-14 14:26:37 +0000 (Sun, 14 Mar 2010)
Log Message:
-----------
[Fix] Pattern Editor: Entered (volume) effects are now properly checked (makes a difference f.e. in MOD format where it was previously possible to enter effects like Hxx)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-03-13 22:34:51 UTC (rev 530)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-03-14 14:26:37 UTC (rev 531)
@@ -3724,7 +3724,6 @@
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- if(pSndFile->m_nType & MOD_TYPE_MOD) return; // no volume column
PrepareUndo(m_dwBeginSel, m_dwEndSel);
@@ -3772,8 +3771,11 @@
}
if (vol > max) vol %= 10;
- p->volcmd = volcmd;
- p->vol = vol;
+ if(pSndFile->GetModSpecifications().HasVolCommand(volcmd))
+ {
+ p->volcmd = volcmd;
+ p->vol = vol;
+ }
}
if (IsEditingEnabled_bmsg())
@@ -3808,7 +3810,7 @@
void CViewPattern::TempEnterFX(int c)
-//---------------------------------------------------------
+//-----------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModDoc *pModDoc = GetDocument();
@@ -3828,7 +3830,7 @@
{
ENTER_PCNOTE_VALUE(c, ValueEffectCol);
}
- else
+ else if(pSndFile->GetModSpecifications().HasCommand(c))
{
//LPCSTR lpcmd = (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) ? gszModCommands : gszS3mCommands;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|