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

[ui] Intrinsics: Fix warnings and exceptions #1898

Merged
merged 2 commits into from
Feb 16, 2023

Commits on Feb 15, 2023

  1. [ImageGallery] Initialize and use "attribute" properly for the intrin…

    …sics table
    
    This commit fixes an "Unable to assign QJSValue to QObject*".
    
    In IntrinsicDisplayDelegate, initialize the "attribute" variant to null
    and set it as a parameter during the instantiation in ImageGallery.
    All references to "model.display" in IntrinsicDisplayDelegate have been
    replaced with a correct use of "attribute".
    cbentejac committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    7bdd7cf View commit details
    Browse the repository at this point in the history
  2. [ui] Check that viewpoints still exist before accessing their metadata

    The metadata value of the viewpoint is meant to be a string, but if the
    viewpoint attribute has already been removed and does not exist anymore,
    then the metadata value becomes a PySide property.
    
    When trying to access that property, an exception is raised. This commit
    avoids raising exceptions in that case by checking that the viewpoint
    attribute still exists (the metadata value is a string instance) before
    accessing the metadata value.
    
    This fixes the "Failed to parse Viewpoint metadata: 'the JSON object must
    be str, bytes or bytearray, not Property'" warning raised by the exception
    which occurred every single time there was a switch between cameraInit
    groups that had been cleared.
    cbentejac committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    1576bfd View commit details
    Browse the repository at this point in the history