1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Fix: apply edited DragValue when it looses focus (#3776)

* Closes https://github.com/emilk/egui/issues/2877
* Closes https://github.com/emilk/egui/pull/3451
This commit is contained in:
Emil Ernerfeldt
2024-01-06 23:51:51 +01:00
committed by GitHub
parent e13cc69d76
commit b6fe244810
5 changed files with 56 additions and 66 deletions

View File

@@ -634,11 +634,8 @@ impl<'a> Table<'a> {
// Hide first-frame-jitters when auto-sizing.
ui.add_visible_ui(!first_frame_auto_size_columns, |ui| {
let hovered_row_index_id = self.state_id.with("__table_hovered_row");
let hovered_row_index = ui.memory_mut(|w| {
let hovered_row = w.data.get_temp(hovered_row_index_id);
w.data.remove::<usize>(hovered_row_index_id);
hovered_row
});
let hovered_row_index =
ui.data_mut(|data| data.remove_temp::<usize>(hovered_row_index_id));
let layout = StripLayout::new(ui, CellDirection::Horizontal, cell_layout, sense);