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

viewport_interaction_active function error #100

Open
imsfc opened this issue Mar 27, 2024 · 2 comments · Fixed by #101
Open

viewport_interaction_active function error #100

imsfc opened this issue Mar 27, 2024 · 2 comments · Fixed by #101

Comments

@imsfc
Copy link
Contributor

imsfc commented Mar 27, 2024

When the editor window is created but not entered by the mouse or loses focus directly from the viewport area of the editor window: assert!(self.pointer_used, false);

I think it should be modified:

pub fn viewport_interaction_active(&self) -> bool {
    !self.pointer_used
-        || matches!(
+        && matches!(
            self.active_editor_interaction,
            Some(ActiveEditorInteraction::Viewport)
        )
}

PixPin_2024-03-27_19-59-44

@jakobhellermann
Copy link
Owner

The || is actually correct, the root cause of this problem is mvlabat/bevy_egui#272

@imsfc
Copy link
Contributor Author

imsfc commented Mar 29, 2024

I see, || is indeed correct, thanks.

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 a pull request may close this issue.

2 participants