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);