From 2a0cba2cb8da8d80c291fb6db61b4b11815e1f01 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:57:28 -0500 Subject: [PATCH] Fix WzMessageView title z-order --- src/intelmap.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/intelmap.cpp b/src/intelmap.cpp index f25e354463f..aa8cdef5b25 100644 --- a/src/intelmap.cpp +++ b/src/intelmap.cpp @@ -228,6 +228,14 @@ void WzMessageView::geometryChanged() bool WzMessageView::initialize(MESSAGE *psMessage) { + auto title = std::make_shared(); + title->setGeometry(0, 0, INTMAP_RESEARCHWIDTH, INTMAP_TITLEHEIGHT); + title->setFontColour(WZCOL_YELLOW); + title->setTextAlignment(WLAB_ALIGNCENTRE); + title->setFont(font_regular, WZCOL_YELLOW); + title->setString(getMessageTitle(*psMessage)); + attach(title); + /* Add the close box */ W_BUTINIT sButInit; sButInit.id = IDINTMAP_CLOSE; @@ -259,14 +267,6 @@ bool WzMessageView::initialize(MESSAGE *psMessage) }); }); - auto title = std::make_shared(); - title->setGeometry(0, 0, INTMAP_RESEARCHWIDTH, INTMAP_TITLEHEIGHT); - title->setFontColour(WZCOL_YELLOW); - title->setTextAlignment(WLAB_ALIGNCENTRE); - title->setFont(font_regular, WZCOL_YELLOW); - title->setString(getMessageTitle(*psMessage)); - attach(title); - auto grid = std::make_shared(); attach(grid); grid->setGeometry(1, INTMAP_TITLEHEIGHT, INTMAP_RESEARCHWIDTH - 2, INTMAP_RESEARCHHEIGHT - 1 - INTMAP_TITLEHEIGHT);