gui: load heatmap before onShow#10956
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the rendering logic in heatMap.cpp by extracting the call to getVisibleMap() into a local variable before the loop. However, this changes the execution order, calling getVisibleMap() before datasource_.onShow() on the first paint, which can lead to rendering with uninitialized or stale state. It is recommended to preserve the lifecycle order by explicitly calling datasource_.ensureMap() within the initialization block instead.
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
e41d8e0 to
eeff097
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Closes #4181
The warning GUI-0066 was caused by calling onShow (which checks if the heatmap is loaded) before loading the heatmap.
Type of Change
Impact
[How does this change the tool's behavior?]
Now the warning isn't raised.
Verification
./etc/Build.sh).Related Issues
[Link issues here]
#4181