Skip to content

Commit c46a700

Browse files
committed
Fixed bug where early notes might be in the wrong colour
1 parent ca459b1 commit c46a700

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripting/methods.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,22 @@ void CMUSHclientDoc::Tell(LPCTSTR Message)
244244
// if output buffer doesn't exist yet, remember note for later
245245
if (m_pCurrentLine == NULL)
246246
{
247-
m_OutstandingLines.push_back (CPaneStyle (Message, m_iNoteColourFore, m_iNoteColourBack, m_iNoteStyle));
247+
COLORREF fore = m_iNoteColourFore,
248+
back = m_iNoteColourBack;
249+
250+
// need to do this in case a normal Note follows a ColourNote ...
251+
252+
// select correct colour, if needed, from custom pallette
253+
if (!m_bNotesInRGB)
254+
{
255+
if (m_iNoteTextColour >= 0 && m_iNoteTextColour < MAX_CUSTOM)
256+
{
257+
fore = m_customtext [m_iNoteTextColour];
258+
back = m_customback [m_iNoteTextColour];
259+
} // end of notes in custom colour
260+
}
261+
262+
m_OutstandingLines.push_back (CPaneStyle (Message, fore, back, m_iNoteStyle));
248263
return;
249264
}
250265

0 commit comments

Comments
 (0)