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

Add device iterator to ImGui ID stack for device selection pop up in RealSense Viewer #11221

Merged
merged 1 commit into from
Jan 10, 2023
Merged

Add device iterator to ImGui ID stack for device selection pop up in RealSense Viewer #11221

merged 1 commit into from
Jan 10, 2023

Conversation

martinseilerameria
Copy link
Contributor

@martinseilerameria martinseilerameria commented Dec 15, 2022

There is a bug in the device selection pop up in RealSense Viewer.

To reproduce:

  1. Connect two or more cameras of the same model
  2. Open RealSenseViewer
  3. Close the default camera
  4. Click on the "Add Source" button
  5. Select the second (or third, fourth, ...) camera in the list -> nothing happens

Problem:
The ID of the ImGui::Selectable is based on the label, which in this case is the device name, which is the same for each camera.
Therefore, there will be an ID conflict and only the first Selectable is working.

Solution:
The problem is solved by adding a unique identifier to the ImGui ID Stack. In the proposed solution this unique identifier is the index of the device in the device_names vector.

@Nir-Az Nir-Az closed this Dec 18, 2022
@Nir-Az Nir-Az reopened this Dec 18, 2022
@Nir-Az
Copy link
Collaborator

Nir-Az commented Dec 18, 2022

@martinseilerameria Thanks for the fix,
We will try to reproduce and verify it.

Copy link
Contributor

@noacoohen noacoohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, we added your commit.

@Nir-Az Nir-Az removed their request for review January 10, 2023 09:30
@Nir-Az Nir-Az merged commit cb43230 into IntelRealSense:development Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants