Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Update banner stays above floating panels (its buttons were hidden under an open Preferences menu)

islandmed6fd752bcf619
diff --git a/src/app/PanelProject.cpp b/src/app/PanelProject.cpp
index 8dc77b39..202f4d25 100644
--- a/src/app/PanelProject.cpp
+++ b/src/app/PanelProject.cpp
@@ -23,6 +23,7 @@
#include "core/Project.h"
#include <imgui.h>
+#include <imgui_internal.h> // (BringWindowToDisplayFront: the update banner)
#include <algorithm>
#include <cmath>
@@ -874,6 +875,9 @@ void App::drawUpdateBanner() {
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing |
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove;
if (ImGui::Begin("##update_banner", nullptr, flags)) {
+ // Above the floating panels (a Preferences window open over the canvas's top would hide its buttons), but
+ // never over a modal dialog.
+ if (!ImGui::GetTopMostPopupModal()) ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
// Reading size (the guide's 17 px fonts), so the highlights are easy to read over the canvas.
if (ImFont* title = guide_.bodyBoldFont()) ImGui::PushFont(title);
ImGui::Text(tr("SculptForge %s is available"), u.version.c_str());
diff --git a/tests/ui/update_check.sfui b/tests/ui/update_check.sfui
index 473cf8bc..fe831ba8 100644
--- a/tests/ui/update_check.sfui
+++ b/tests/ui/update_check.sfui
@@ -48,5 +48,12 @@ wait_idle 20
expect_text "SculptForge 99.0.0-beta.1 is available"
expect_text "Try the beta"
shot update-banner-beta
+# The banner stays above the Preferences menu, its buttons in sight: the first click outside the menu closes it (as
+# for any menu), the next one is Later's.
click "Later"
+expect_not "Update channel"
+click "Later"
+expect_not "Skip this version"
+click "Preferences##palette.preferences"
+expect_text "Update channel"
click "Stable##prefs.update_stable"