jakobhellermann / bevy_editor_pls

In-App editor tools for bevy applications
Other
758 stars 78 forks source link

viewport_interaction_active function error #100

Open imsfc opened 7 months ago

imsfc commented 7 months ago

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 commented 7 months ago

The || is actually correct, the root cause of this problem is https://github.com/mvlabat/bevy_egui/issues/272

imsfc commented 7 months ago

I see, || is indeed correct, thanks.