From d468545428f3e791dfd8be27b285b44cea5f2d54 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Mon, 3 Oct 2022 20:44:23 -0700 Subject: [PATCH 1/3] Fix crash on falling into void --- src/source/PropertyWindow.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/source/PropertyWindow.cpp b/src/source/PropertyWindow.cpp index 928886d..cd2669a 100644 --- a/src/source/PropertyWindow.cpp +++ b/src/source/PropertyWindow.cpp @@ -338,7 +338,7 @@ void PropertyWindow::_resize() void PropertyWindow::UpdateSelected(std::vector instances) { - if(instances.size() < 0) + if(instances.size() <= 0) { ClearProperties(); return; @@ -367,5 +367,14 @@ void PropertyWindow::UpdateSelected(std::vector instances) void PropertyWindow::ClearProperties() { - PropGrid_ResetContent(_propGrid); + if(g_dataModel != NULL) + { + std::vector dm; + dm.push_back(g_dataModel); + UpdateSelected(dm); + } + else + { + PropGrid_ResetContent(_propGrid); + } } \ No newline at end of file From b66d524d7f6dce5d8d90fe0969934b74b16efd15 Mon Sep 17 00:00:00 2001 From: Vulpovile Date: Mon, 3 Oct 2022 20:45:07 -0700 Subject: [PATCH 2/3] Patch bump --- Blocks3D.exe.manifest | 2 +- Dialogs.rc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Blocks3D.exe.manifest b/Blocks3D.exe.manifest index c560b3b..90d0cc6 100644 --- a/Blocks3D.exe.manifest +++ b/Blocks3D.exe.manifest @@ -1,7 +1,7 @@ Date: Mon, 3 Oct 2022 20:50:05 -0700 Subject: [PATCH 3/3] Cleanup --- src/source/PropertyWindow.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/source/PropertyWindow.cpp b/src/source/PropertyWindow.cpp index cd2669a..1669a20 100644 --- a/src/source/PropertyWindow.cpp +++ b/src/source/PropertyWindow.cpp @@ -369,9 +369,7 @@ void PropertyWindow::ClearProperties() { if(g_dataModel != NULL) { - std::vector dm; - dm.push_back(g_dataModel); - UpdateSelected(dm); + g_dataModel->getSelectionService()->addSelected(g_dataModel); } else {