-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Ui::dnd_drop_zone() swallows the inner Response #4059
Labels
feature
New feature or request
Comments
It should be easy enough to change the signature of pub fn dnd_drop_zone<Payload, R>(
&mut self,
frame: Frame,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> (InnerResponse<R>, Option<Arc<Payload>>) if someone wants to take a stab at it |
I'll give it a look today. |
sowbug
added a commit
to sowbug/egui
that referenced
this issue
Feb 20, 2024
emilk
pushed a commit
that referenced
this issue
Feb 21, 2024
* Closes <#4059> ```bash $ ./scripts/check.sh [...] + echo 'All checks passed.' ```
hacknus
pushed a commit
to hacknus/egui
that referenced
this issue
Oct 30, 2024
* Closes <emilk#4059> ```bash $ ./scripts/check.sh [...] + echo 'All checks passed.' ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The signature is
Note that
add_contents: impl FnOnce(&mut Ui)
doesn't return a result. It's thus unclear how we're supposed to know what happened to the contents.I can do this:
... but that's quite a bit more cumbersome than something like this:
(That hypothetical code assumes that dnd_drop_zone uses something like an InnerResponse rather than a plain old Response.)
I hope there isn't anything obvious I'm missing here, but I looked at the
dnd_drop_zone
source, and it looks like there was no provision for add_contents's response to be preserved:The text was updated successfully, but these errors were encountered: