@@ -105,11 +105,14 @@ void LogPaneSecondView::CheckItem(const SignalTickPtr& vSignalTick) {
105
105
void LogPaneSecondView::DrawMenuBar () {
106
106
bool need_update = false ;
107
107
if (ImGui::BeginMenu (" Settings" )) {
108
- if (ImGui::MenuItem (" Show variable signals only" , nullptr , &ProjectFile::Instance ()->m_ShowVariableSignalsInLog2ndView )) {
109
- LogEngine::Instance ()->SetHoveredTime (LogEngine::Instance ()->GetHoveredTime ());
108
+ if (ImGui::MenuItem (" Collapse Selection" , nullptr , &ProjectFile::Instance ()->m_CollapseLog2ndSelection )) {
110
109
need_update = true ;
111
110
}
112
- if (ImGui::MenuItem (" Collapse Selection" , nullptr , &ProjectFile::Instance ()->m_CollapseLog2ndSelection )) {
111
+ if (ImGui::MenuItem (" Auto resize columns" , nullptr , &ProjectFile::Instance ()->m_AutoResizeLog2ndColumns )) {
112
+ need_update = true ;
113
+ }
114
+ if (ImGui::MenuItem (" Show variable signals only" , nullptr , &ProjectFile::Instance ()->m_ShowVariableSignalsInLog2ndView )) {
115
+ LogEngine::Instance ()->SetHoveredTime (LogEngine::Instance ()->GetHoveredTime ());
113
116
need_update = true ;
114
117
}
115
118
if (ImGui::MenuItem (" Hide some values" , nullptr , &ProjectFile::Instance ()->m_HideSomeLog2ndValues )) {
@@ -144,10 +147,13 @@ void LogPaneSecondView::DrawMenuBar() {
144
147
}
145
148
146
149
void LogPaneSecondView::DrawTable () {
147
- static ImGuiTableFlags flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_RowBg | ImGuiTableFlags_Hideable | ImGuiTableFlags_ScrollY |
148
- ImGuiTableFlags_Resizable |
150
+ ImGuiTableFlags flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_RowBg | ImGuiTableFlags_Hideable | ImGuiTableFlags_ScrollY |
149
151
ImGuiTableFlags_NoHostExtendY;
150
152
153
+ if (!ProjectFile::Instance ()->m_AutoResizeLog2ndColumns ) {
154
+ flags |= ImGuiTableFlags_Resizable;
155
+ }
156
+
151
157
// first display
152
158
if (m_LogDatas.empty ()) {
153
159
PrepareLog ();
0 commit comments