fix: Highlighting in hex editor not being drawn correctly anymore
This commit is contained in:
parent
f2a795c51e
commit
71dd349044
@ -263,6 +263,11 @@ namespace hex::plugin::builtin::ui {
|
||||
}
|
||||
|
||||
void HexEditor::drawSelectionFrame(u32 x, u32 y, Region selection, u64 byteAddress, u16 bytesPerCell, const ImVec2 &cellPos, const ImVec2 &cellSize, const ImColor &backgroundColor) const {
|
||||
auto drawList = ImGui::GetWindowDrawList();
|
||||
|
||||
// Draw background color
|
||||
drawList->AddRectFilled(cellPos, cellPos + cellSize, backgroundColor);
|
||||
|
||||
if (!this->isSelectionValid()) return;
|
||||
|
||||
if (!Region { byteAddress, 1 }.isWithin(selection))
|
||||
@ -270,11 +275,6 @@ namespace hex::plugin::builtin::ui {
|
||||
|
||||
const color_t SelectionFrameColor = ImGui::GetColorU32(ImGuiCol_Text);
|
||||
|
||||
auto drawList = ImGui::GetWindowDrawList();
|
||||
|
||||
// Draw background color
|
||||
drawList->AddRectFilled(cellPos, cellPos + cellSize, backgroundColor);
|
||||
|
||||
// Draw vertical line at the left of first byte and the start of the line
|
||||
if (x == 0 || byteAddress == selection.getStartAddress())
|
||||
drawList->AddLine(cellPos, cellPos + ImVec2(0, cellSize.y), ImColor(SelectionFrameColor), 1_scaled);
|
||||
|
Loading…
Reference in New Issue
Block a user