Don't mark windows as write-modified when only reading data.

This commit is contained in:
Bartosz Taudul 2020-06-06 20:46:46 +02:00
parent bee70ee72b
commit 9c49ee3dd3
2 changed files with 7 additions and 7 deletions

View File

@ -918,7 +918,7 @@ void SourceView::RenderSimpleSourceView()
}
RenderLine( line, lineNum++, 0, 0, 0, nullptr );
}
const auto& win = ImGui::GetCurrentWindow();
const auto win = ImGui::GetCurrentWindowRead();
m_srcWidth = win->DC.CursorMaxPos.x - win->DC.CursorStartPos.x;
}
else
@ -1416,7 +1416,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
}
RenderLine( line, lineNum++, 0, iptotal, ipmax, &worker );
}
const auto& win = ImGui::GetCurrentWindow();
const auto win = ImGui::GetCurrentWindowRead();
m_srcWidth = win->DC.CursorMaxPos.x - win->DC.CursorStartPos.x;
}
else
@ -1443,7 +1443,7 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
}
}
auto win = ImGui::GetCurrentWindow();
const auto win = ImGui::GetCurrentWindowRead();
if( win->ScrollbarY )
{
auto draw = ImGui::GetWindowDrawList();
@ -1689,7 +1689,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
}
RenderAsmLine( line, 0, iptotal, ipmax, worker, jumpOut, maxAddrLen, view );
}
const auto& win = ImGui::GetCurrentWindow();
const auto win = ImGui::GetCurrentWindowRead();
m_asmWidth = win->DC.CursorMaxPos.x - win->DC.CursorStartPos.x;
}
else
@ -1859,7 +1859,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map<u
#endif
}
auto win = ImGui::GetCurrentWindow();
const auto win = ImGui::GetCurrentWindowRead();
if( win->ScrollbarY )
{
auto draw = ImGui::GetWindowDrawList();

View File

@ -1293,7 +1293,7 @@ void View::DrawFrames()
enum { MaxFrameTime = 50 * 1000 * 1000 }; // 50ms
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImGuiWindow* window = ImGui::GetCurrentWindowRead();
if( window->SkipItems ) return;
auto& io = ImGui::GetIO();
@ -2300,7 +2300,7 @@ void View::DrawZones()
if( m_vd.zvStart == m_vd.zvEnd ) return;
assert( m_vd.zvStart < m_vd.zvEnd );
if( ImGui::GetCurrentWindow()->SkipItems ) return;
if( ImGui::GetCurrentWindowRead()->SkipItems ) return;
m_gpuThread = 0;
m_gpuStart = 0;