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

Adding tabs in floating windows does not respect surface #166

Closed
knoellle opened this issue Aug 27, 2023 · 4 comments · Fixed by #167
Closed

Adding tabs in floating windows does not respect surface #166

knoellle opened this issue Aug 27, 2023 · 4 comments · Fixed by #167
Labels
bug Something isn't working

Comments

@knoellle
Copy link
Contributor

Describe the bug

The tab_add feature only works on the main surface.
This is because TabViewer::on_add does not know which surface the tab belongs to.

To Reproduce
Steps to reproduce the behavior:

  1. run cargo run --example tab_add
  2. Drag any tab to make it pop out into an floating egui window
  3. Click on the + button next to the popped out tab
  4. Instead of inside the window, the new tab is spawned in the first tree leaf of the main surface.

Expected behavior
The tab should be added to the floating window, but as far as I know, this is currently not possible to implement.

Screenshots
egui_dock_tab_add_floating_window

Additional context
Ideally the node indices would be unique across the whole DockState structure or TabViewer::on_add should be passed the surface index.

@knoellle knoellle added the bug Something isn't working label Aug 27, 2023
@Adanos020
Copy link
Owner

Nicely spotted, we'll look into it.
Glad to see someone is testing the release branches 😄

@Adanos020
Copy link
Owner

Fixed by #167

@knoellle
Copy link
Contributor Author

Perfect, thanks for the quick response! ❤️
Now all I need is popping out to an actual window :D

@Adanos020
Copy link
Owner

That would be trickier but who knows, maybe someone eventually implements proper multi-viewport support for egui :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants