pattern: Properly display Start/End/Size column again for zero sized types
This commit is contained in:
parent
d297b2d1cc
commit
ceed8c7420
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
||||
Subproject commit 965ba40f8b4dca7c1c52a4d7a5b3d42c991f5a96
|
||||
Subproject commit f8d17fc99949350e9820556b7445014e24c347f1
|
@ -111,9 +111,7 @@ namespace hex::plugin::builtin::ui {
|
||||
if (pattern.isPatternLocal()) {
|
||||
ImGui::TextFormatted("[{}]", "hex.builtin.pattern_drawer.local"_lang);
|
||||
} else {
|
||||
if (pattern.getSize() > 0) {
|
||||
ImGui::TextFormatted("0x{0:08X}", pattern.getOffset());
|
||||
}
|
||||
ImGui::TextFormatted("0x{0:08X}", pattern.getOffset());
|
||||
}
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
@ -121,9 +119,7 @@ namespace hex::plugin::builtin::ui {
|
||||
if (pattern.isPatternLocal()) {
|
||||
ImGui::TextFormatted("[{}]", "hex.builtin.pattern_drawer.local"_lang);
|
||||
} else {
|
||||
if (pattern.getSize() > 0) {
|
||||
ImGui::TextFormatted("0x{0:08X}", pattern.getOffset() + pattern.getSize() - (pattern.getSize() == 0 ? 0 : 1));
|
||||
}
|
||||
ImGui::TextFormatted("0x{0:08X}", pattern.getOffset() + pattern.getSize() - (pattern.getSize() == 0 ? 0 : 1));
|
||||
}
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
@ -140,7 +136,7 @@ namespace hex::plugin::builtin::ui {
|
||||
void drawSizeColumn(const pl::ptrn::Pattern& pattern) {
|
||||
if (auto *bitfieldMember = dynamic_cast<pl::ptrn::PatternBitfieldMember const*>(&pattern); bitfieldMember != nullptr && bitfieldMember->getParentBitfield() != nullptr)
|
||||
drawSizeColumnForBitfieldMember(*bitfieldMember);
|
||||
else if (pattern.getSize() > 0)
|
||||
else
|
||||
ImGui::TextFormatted("0x{0:04X}", pattern.getSize());
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
Loading…
x
Reference in New Issue
Block a user