From f8e16ad9d7712339400ca55b1a3ab4a426f1da2a Mon Sep 17 00:00:00 2001 From: Francisco Garcia Date: Sun, 22 Sep 2024 08:36:06 +0200 Subject: [PATCH] Fix issues in dbind_destroy() and layout_panel_replace() --- Changelog.md | 4 +++- prj/build.txt | 2 +- src/core/dbind.c | 3 ++- src/gui/layout.c | 7 +++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index f704a6ee..b3bae562 100644 --- a/Changelog.md +++ b/Changelog.md @@ -29,6 +29,8 @@ * GTK flatbutton padding. [Commit](https://github.com/frang75/nappgui_src/commit/5c41f9697ea7e6664b8b9db6cf16c32229ea8c36). * GTK render listbox checks in Xubuntu. [Commit](https://github.com/frang75/nappgui_src/commit/3c6247159f311195b2871b1fa10492c986b4f42d). * macOS HighSierra and lowers focus ring drawing issue. [Commit](https://github.com/frang75/nappgui_src/commit/a163cb2555101b831414b6deb781a1d1c49ccd42). +* Issue in `dbind_destroy()`. [Commit](). +* Issue in `layout_panel_replace()`. [Commit](). ### Improved @@ -40,7 +42,7 @@ * MinGW desktop apps don't require a local `Application.manifest`. They reference the same file in `/prj/templates`. [Commit](https://github.com/frang75/nappgui_src/commit/ff6a60fab7333bb721c55e5000268107758813f4). * New function `nap_link_inet(targetName)`. [Commit](https://github.com/frang75/nappgui_src/commit/241be10f0258ff2ecaf2087a3a033876aa4b58cd). * New function `nap_link_opengl(targetName)`. [Commit](https://github.com/frang75/nappgui_src/commit/241be10f0258ff2ecaf2087a3a033876aa4b58cd). -* New CMake option `-DNAPPGUI_NO_CRTDBG=YES` to disable the CRT debugger in Windows. [Issue](https://github.com/frang75/nappgui_src/issues/152). [Commit](). +* New CMake option `-DNAPPGUI_NO_CRTDBG=YES` to disable the CRT debugger in Windows. [Issue](https://github.com/frang75/nappgui_src/issues/152). [Commit](https://github.com/frang75/nappgui_src/commit/b65fc3194b22b77bab00ba079e25de96a4d3accc). ## v1.4.2 - Jun 30, 2024 (r5177) diff --git a/prj/build.txt b/prj/build.txt index 5e052c4f..15b7e635 100644 --- a/prj/build.txt +++ b/prj/build.txt @@ -1 +1 @@ -5452 +5456 diff --git a/src/core/dbind.c b/src/core/dbind.c index e2bfcaf8..5df6f4d8 100644 --- a/src/core/dbind.c +++ b/src/core/dbind.c @@ -1456,7 +1456,8 @@ static void i_remove_object(byte_t *data, const StBind *stbind, const uint16_t s break; case ekDTYPE_OBJECT_PTR: - i_destroy_object(dcast(data + member->offset, byte_t), member->attr.object.stbind, member->size); + cassert(member->size == sizeofptr); + i_destroy_object(dcast(data + member->offset, byte_t), member->attr.object.stbind, member->attr.object.stbind->size); break; case ekDTYPE_OBJECT_OPAQUE: diff --git a/src/gui/layout.c b/src/gui/layout.c index dcccb900..55e8e275 100644 --- a/src/gui/layout.c +++ b/src/gui/layout.c @@ -585,6 +585,13 @@ void layout_panel_replace(Layout *layout, Panel *panel, const uint32_t col, cons { i_set_component(layout, GuiComponentPtr(panel), col, row, ekJUSTIFY, ekJUSTIFY); cassert(cell->tabstop == TRUE); + + if (layout->panel != NULL) + { + Window *parent_window = _panel_get_window(layout->panel); + _component_set_parent_window(GuiComponentPtr(panel), parent_window); + layout_update(layout); + } } else {