|
From: <sag...@us...> - 2010-09-27 00:15:48
|
Revision: 721
http://modplug.svn.sourceforge.net/modplug/?rev=721&view=rev
Author: saga-games
Date: 2010-09-27 00:15:39 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
[Mod] Edit History: It's now possible to clear the history completely
[Mod] OpenMPT: Version is now 1.19.00.05 (since the last commit, actually)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/dlg_misc.cpp
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-09-26 23:47:33 UTC (rev 720)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-09-27 00:15:39 UTC (rev 721)
@@ -3142,7 +3142,7 @@
s.Format(_T("Edit history for %s"), m_pModDoc->GetTitle());
SetWindowText(s);
- GetDlgItem(IDC_BTN_CLEAR)->EnableWindow((m_pModDoc->GetFileHistory()->size() > 1) ? TRUE : FALSE);
+ GetDlgItem(IDC_BTN_CLEAR)->EnableWindow((m_pModDoc->GetFileHistory()->empty()) ? FALSE : TRUE);
return TRUE;
@@ -3152,19 +3152,12 @@
void CEditHistoryDlg::OnClearHistory()
//------------------------------------
{
- if(m_pModDoc == nullptr)
- return;
-
- if(m_pModDoc->GetFileHistory()->size() > 1)
+ if(m_pModDoc != nullptr && !m_pModDoc->GetFileHistory()->empty())
{
- while(m_pModDoc->GetFileHistory()->size() > 1)
- {
- m_pModDoc->GetFileHistory()->erase(m_pModDoc->GetFileHistory()->begin());
- }
+ m_pModDoc->GetFileHistory()->clear();
m_pModDoc->SetModified();
+ OnInitDialog();
}
-
- OnInitDialog();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|