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

Strange update behaviours of SceneWidget when directly layouted in on_layout #4315

Open
hernot opened this issue Nov 18, 2021 · 2 comments
Open
Labels

Comments

@hernot
Copy link

hernot commented Nov 18, 2021

IMPORTANT: Please use the following template to report the bug.

Before submitting:

  1. Search for similar issues.
  2. For Python issues, please test with the latest development wheel. It may be already fixed!

Describe the bug

When building my own multipannel viewer using the new gui i obeserve the following strange behavior. The frame property of each widget is updated by my custom on_layout function which is registered to the window using set_on_layout method. When starting the viewer and for example maximize the window the following happens.

  1. the top right compas view appears on the maximized window some where in the middle. Respective it stays where it was layouted on the not maximized window and thus overlays the other views which are properly resized. This behaviour is most likely caused by the lines 829 of SceneWidget.cpp file on current master. This line does only update the frame when the frame size has changed but not its position. As the compas widget has constant size and should not change its size it will not be repositioned to its new location top right on the maximized window but stays within the window where it was placed intitally on th the non maximized window.
    My current workarround is set frame twice with two differnt clearly distinct sizes. Thereby the second one is the final size the widgets should have on the maximized or when demaximizing on the non maximized window.

  2. It seems that the gui window is not cleared before the widgets are redrawn in their new layout. The previous content of the window stays in the background and is over drawn by the widgets in their new position.

To Reproduce

Use the attached python script creating the described viewer.
Start the script
Maximize the window
Unmaximize the window

Expected behavior

That SceneWidget is moved to its intended position even if its size has not be changed. Make line 829 also check if position of frame has changed not just its size. Or if that is not possible discard this line and do not try to optimize for widgets not changed in size.

Screenshots

Environment (please complete the following information):

  • Operating system: Ubuntu 20.04 (Mint 20)
  • Python version: Python 3.8
  • Open3D version: 0.13.0
  • Is this remote workstation?: no
  • How did you install Open3D?: pip
  • Compiler version (if built from source): N/A

wreckout.py.gz

@theNded theNded added the ui label Nov 19, 2021
@hernot
Copy link
Author

hernot commented Dec 17, 2021

Update. It seems that the window background is cleared and the resized Window is properly redrawn as soon as any interaction with the 3D Widgets has happened. Seems as if a forced redraw of all parts of the window including the window itself would be necessary when resizing the window. And not just of the widgets which change their layout.

@hernot
Copy link
Author

hernot commented Mar 13, 2023

#any news here or would that be linked to filament too like issue #4329.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants