From efa2319a2619101a9bdf0fd9a80c9720676b1893 Mon Sep 17 00:00:00 2001 From: Adanos020 Date: Fri, 9 Feb 2024 14:37:54 +0000 Subject: [PATCH 1/2] Fix docking on empty main surface. --- src/widgets/dock_area/show/main_surface.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dock_area/show/main_surface.rs b/src/widgets/dock_area/show/main_surface.rs index b5dade68..fb8de141 100644 --- a/src/widgets/dock_area/show/main_surface.rs +++ b/src/widgets/dock_area/show/main_surface.rs @@ -20,7 +20,7 @@ impl<'tree, Tab> DockArea<'tree, Tab> { if self.dock_state.main_surface().is_empty() { let rect = ui.available_rect_before_wrap(); let response = ui.allocate_rect(rect, Sense::hover()); - if response.hovered() { + if response.contains_pointer() { self.hover_data = Some(HoverData { rect, dst: TreeComponent::Surface(surf_index), From a42e78c93a72b6d9985413fa8c9067eaaf786a57 Mon Sep 17 00:00:00 2001 From: Adanos020 Date: Fri, 9 Feb 2024 14:44:19 +0000 Subject: [PATCH 2/2] Update changelog and bump patch number. --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a9f117..d1fb46a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # egui_dock changelog +## 0.11.1 - 2024-02-09 + +### Fixed +- Bug where tabs couldn't be re-docked onto the main surface if it's empty ([#222](https://github.com/Adanos020/egui_dock/pull/222)) + ## 0.11.0 - 2024-02-06 ### Added diff --git a/Cargo.toml b/Cargo.toml index d51efb77..47bd1009 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "egui_dock" description = "Docking system for egui - an immediate-mode GUI library for Rust" authors = ["lain-dono", "Adam Gąsior (Adanos020)"] -version = "0.11.0" +version = "0.11.1" edition = "2021" rust-version = "1.72" license = "MIT"