From: <sag...@us...> - 2014-06-07 15:33:13
|
Revision: 4088 http://sourceforge.net/p/modplug/code/4088 Author: saga-games Date: 2014-06-07 15:32:59 +0000 (Sat, 07 Jun 2014) Log Message: ----------- [Imp] When loading plugins during startup, the error message that was potentially shown didn't appear in the task bar, making it easy to forget about such a half-initialized OpenMPT instance. [Imp] Stay at current order/pattern when removing something from the order list (https://bugs.openmpt.org/view.php?id=511) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Mptrack.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-06-05 15:36:49 UTC (rev 4087) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-06-07 15:32:59 UTC (rev 4088) @@ -10,12 +10,13 @@ #include "stdafx.h" -#include "mptrack.h" -#include "mainfrm.h" +#include "Mptrack.h" +#include "Mainfrm.h" +#include "View_tre.h" #include "InputHandler.h" -#include "moddoc.h" -#include "globals.h" -#include "ctrl_pat.h" +#include "Moddoc.h" +#include "Globals.h" +#include "Ctrl_pat.h" #include "PatternClipboard.h" @@ -154,6 +155,7 @@ SendMessage(WM_SETFONT, (WPARAM)m_hFont); SetScrollPos(SB_HORZ, 0); EnableScrollBarCtrl(SB_HORZ, TRUE); + SetCurSel(0); return TRUE; } @@ -172,7 +174,7 @@ UINT nPage; int nMax = 0; - if(sndFile.GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM)) + if(!sndFile.GetModSpecifications().hasStopIndex) { // With MOD / XM, cut shown sequence to first '---' item... nMax = sndFile.Order.GetLengthFirstEmpty(); @@ -299,7 +301,7 @@ { // Must move first shown sequence item to left in order to show // the new active order. - m_nXScroll = std::max(ORDERINDEX(0), static_cast<ORDERINDEX>(nOrder - nMargins)); + m_nXScroll = static_cast<ORDERINDEX>(std::max(0, static_cast<int>(nOrder - nMargins))); SetScrollPos(SB_HORZ, m_nXScroll); InvalidateRect(NULL, FALSE); } else @@ -1214,11 +1216,9 @@ InvalidateRect(NULL, FALSE); m_pModDoc.UpdateAllViews(NULL, HINT_MODSEQUENCE, this); - SetCurSel(selection.firstOrd); - PATTERNINDEX nNewPat = sndFile.Order[selection.firstOrd]; - if ((nNewPat < sndFile.Patterns.Size()) && (sndFile.Patterns[nNewPat] != nullptr) && (m_pParent)) + if(sndFile.m_PlayState.m_nCurrentOrder > selection.lastOrd) { - m_pParent.SetCurrentPattern(nNewPat); + sndFile.m_PlayState.m_nNextOrder -= selection.GetSelCount(); } } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-05 15:36:49 UTC (rev 4087) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-07 15:32:59 UTC (rev 4088) @@ -1735,7 +1735,7 @@ } if(!nonFoundPlugs.empty()) { - Reporting::Notification(L"Problems were encountered with plugins:\n" + nonFoundPlugs); + Reporting::Notification(L"Problems were encountered with plugins:\n" + nonFoundPlugs, L"OpenMPT", CWnd::GetDesktopWindow()); } return FALSE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |