mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-31 14:25:49 +08:00
Debug Tools: ID Stack Tool: preserve first data type, so user of PushOverrideID() e.g. TreeNode() elements don't get demoted from _String to _ID.
This commit is contained in:
@@ -17892,6 +17892,7 @@ void ImGui::DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* dat
|
|||||||
tool->ResultPathsBuf.append(result, result_end + 1); // Include zero terminator
|
tool->ResultPathsBuf.append(result, result_end + 1); // Include zero terminator
|
||||||
}
|
}
|
||||||
info->QuerySuccess = true;
|
info->QuerySuccess = true;
|
||||||
|
if (info->DataType == -1)
|
||||||
info->DataType = (ImS8)data_type;
|
info->DataType = (ImS8)data_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2125,7 +2125,7 @@ struct ImGuiStackLevelInfo
|
|||||||
ImS8 DataType; // ImGuiDataType
|
ImS8 DataType; // ImGuiDataType
|
||||||
int DescOffset; // -1 or offset into parent's ResultPathsBuf
|
int DescOffset; // -1 or offset into parent's ResultPathsBuf
|
||||||
|
|
||||||
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); DescOffset = -1; }
|
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); DataType = -1; DescOffset = -1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// State for ID Stack tool queries
|
// State for ID Stack tool queries
|
||||||
|
|||||||
Reference in New Issue
Block a user