|
From: <sag...@us...> - 2010-01-08 12:50:23
|
Revision: 458
http://modplug.svn.sourceforge.net/modplug/?rev=458&view=rev
Author: saga-games
Date: 2010-01-08 12:14:54 +0000 (Fri, 08 Jan 2010)
Log Message:
-----------
[Fix] Instrument Editor: Well, apparently there WAS a reason to not use InvalidateRect (Toggling loop points did not update the toolbar)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_ins.cpp
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2010-01-08 12:01:38 UTC (rev 457)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-01-08 12:14:54 UTC (rev 458)
@@ -2366,7 +2366,7 @@
if(!EnvGetLoop())
EnvSetLoopStart(0);
EnvSetLoopStart(m_nDragItem - 1);
- InvalidateRect(NULL, FALSE);
+ GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already
}
@@ -2381,7 +2381,7 @@
EnvSetLoopStart(0);
}
EnvSetLoopEnd(m_nDragItem - 1);
- InvalidateRect(NULL, FALSE);
+ GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already
}
@@ -2393,7 +2393,7 @@
if(!EnvGetSustain())
EnvSetSustain(true);
EnvSetSustainStart(m_nDragItem - 1);
- InvalidateRect(NULL, FALSE);
+ GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already
}
@@ -2408,7 +2408,7 @@
EnvSetSustainStart(0);
}
EnvSetSustainEnd(m_nDragItem - 1);
- InvalidateRect(NULL, FALSE);
+ GetDocument()->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); // sanity checks are done in GetEnvelopePtr() already
}
@@ -2419,8 +2419,9 @@
if(pEnv == nullptr || !IsDragItemEnvPoint()) return;
if(EnvToggleReleaseNode(m_nDragItem - 1))
{
- GetDocument()->SetModified();
- InvalidateRect(NULL, FALSE);
+ CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already
+ pModDoc->SetModified();
+ pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|