@@ -184,6 +184,7 @@ BEGIN_MSG_MAP2(CMainFrame)
184
184
COMMAND_ID_HANDLER_EX (ID_FILE_LOAD_CONFIGURATION, OnFileLoadConfiguration)
185
185
COMMAND_ID_HANDLER_EX (ID_FILE_SAVE_CONFIGURATION, OnFileSaveConfiguration)
186
186
COMMAND_ID_HANDLER_EX (ID_LOG_CLEAR, OnLogClear)
187
+ COMMAND_ID_HANDLER_EX (ID_LOG_CROP, OnLogCrop)
187
188
COMMAND_ID_HANDLER_EX (ID_LOG_PAUSE, OnLogPause)
188
189
COMMAND_ID_HANDLER_EX (ID_LOG_GLOBAL, OnLogGlobal)
189
190
COMMAND_ID_HANDLER_EX (ID_LOG_HISTORY, OnLogHistory)
@@ -1031,8 +1032,6 @@ void CMainFrame::OnFileRun(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl*/
1031
1032
void CMainFrame::Load (const std::wstring& filename, bool keeptailing)
1032
1033
{
1033
1034
SetTitle (filename);
1034
- if (!IsPaused ())
1035
- Pause ();
1036
1035
ClearLog ();
1037
1036
m_logSources.AddAnyFileReader (WStr (std::experimental::filesystem::path (filename).filename ().string ()), keeptailing);
1038
1037
}
@@ -1054,8 +1053,6 @@ void CMainFrame::Load(std::istream& file, const std::string& name, FILETIME file
1054
1053
{
1055
1054
Win32::ScopedCursor cursor (::LoadCursor (nullptr , IDC_WAIT));
1056
1055
1057
- if (!IsPaused ())
1058
- Pause ();
1059
1056
ClearLog ();
1060
1057
1061
1058
Line line;
@@ -1131,9 +1128,8 @@ void CMainFrame::OnFileSaveConfiguration(UINT /*uNotifyCode*/, int /*nID*/, CWin
1131
1128
1132
1129
void CMainFrame::ClearLog ()
1133
1130
{
1134
- // First Clear LogFile so views reset their m_firstLine:
1135
1131
m_logFile.Clear ();
1136
- m_logSources.Reset ();
1132
+ m_logSources.ResetTimer ();
1137
1133
int views = GetViewCount ();
1138
1134
for (int i = 0 ; i < views; ++i)
1139
1135
{
@@ -1150,6 +1146,26 @@ void CMainFrame::OnLogClear(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl*
1150
1146
ClearLog ();
1151
1147
}
1152
1148
1149
+ void CMainFrame::OnLogCrop (UINT /* uNotifyCode*/ , int /* nID*/ , CWindow /* wndCtl*/ )
1150
+ {
1151
+ auto selection = GetView ().GetSelectedRange ();
1152
+ if (selection.count < 2 ) return ;
1153
+
1154
+ // LogFile temp = m_logFile.Copy(selection.beginLine, selection.endLine);
1155
+ // m_logFile.Swap(temp);
1156
+ //
1157
+ // m_logSources.ResetTimer();
1158
+ // int views = GetViewCount();
1159
+ // for (int i = 0; i < views; ++i)
1160
+ // {
1161
+ // GetView(i).Clear();
1162
+ // SetModifiedMark(i, false);
1163
+ // GetTabCtrl().UpdateLayout();
1164
+ // GetTabCtrl().Invalidate();
1165
+ // }
1166
+ // UpdateStatusBar();
1167
+ }
1168
+
1153
1169
void CMainFrame::OnLinkViews (UINT /* uNotifyCode*/ , int /* nID*/ , CWindow /* wndCtl*/ )
1154
1170
{
1155
1171
m_linkViews = !m_linkViews;
0 commit comments