Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Viewer] Load and unload the SfMStats components explicitly every time they are shown and hidden #1912

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

cbentejac
Copy link
Contributor

Description

This PR fixes an issue that occurs when displaying the "StructureFromMotion Statistics" and "StructureFromMotion Global Statistics" components more than once per session. The components would be correctly loaded upon their first display, but disabling them and redisplaying them would lead to empty graphs, as the SfMData would not be correctly reloaded.

The SfMData is now provided to the components every time they are to be displayed (instead of providing it only once the first time they were to be displayed, and then never again), and the components' source is explicitly unloaded when they are hidden again. The behaviour of the statistics components is now similar to the other components' (such as the FeatureViewer, for example).

The image on the left below shows the statistics graphs that were displayed upon the SfMStats components' second display, while the image on the right shows how they always are with this PR (and not only for the first display).

==>

Features list

  • Explicitly reset the source of the SfMStats components when they are hidden;
  • Explicitly provide the SfMData every time the SfMStats components are displayed.

The SfmStatsView and SfmGlobalStats components used to be loaded once
and for all with "Component.onCompleted". With the upgrade to Qt 5.14,
it is needed to load and explicitly unload the component (by resetting its
source) for the statistics to always be correctly displayed. Otherwise,
they can be loaded and viewed only once per session; after being shown for
the first time, they are set to null and never reloaded.

This commit uses the same type of loading/unloading as all the other
components in the 2D Viewer.
@fabiencastan fabiencastan added this to the Meshroom 2023.1.0 milestone Mar 3, 2023
@fabiencastan fabiencastan merged commit a7a81b5 into develop Mar 3, 2023
@fabiencastan fabiencastan deleted the fix/sfmStats branch March 3, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants