From 40d08c4a7c56cab9fb0e5f514e0021c25a2d91ff Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 23 Jan 2017 21:58:42 +0100 Subject: [PATCH] CBuildInfo: move InitInfoItems() into exec() ensures paint of data on each repaint. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9df86b6c379a89f2fc80971345585301d6562b99 Author: Thilo Graf Date: 2017-01-23 (Mon, 23 Jan 2017) --- src/gui/buildinfo.cpp | 11 ++++++++--- src/gui/buildinfo.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gui/buildinfo.cpp b/src/gui/buildinfo.cpp index 782edc07e..23f81f85b 100644 --- a/src/gui/buildinfo.cpp +++ b/src/gui/buildinfo.cpp @@ -35,9 +35,13 @@ using namespace std; -CBuildInfo::CBuildInfo() : CComponentsWindow(0, 0, 700, 500, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO) +CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, 700, 500, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO) { initVarBuildInfo(); + if (show) + exec(NULL, ""); + else + InitInfoItems(); } //init all var members @@ -47,7 +51,6 @@ void CBuildInfo::initVarBuildInfo() font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_HINT]; setWindowHeaderButtons(CComponentsHeader::CC_BTN_MENU | CComponentsHeader::CC_BTN_EXIT); - InitInfoItems(); shadow = true; @@ -60,7 +63,9 @@ int CBuildInfo::exec(CMenuTarget* parent, const string & /*actionKey*/) if (parent) parent->hide(); - + + InitInfoItems(); + //exit if no informations available if (!HasData()){ return res; diff --git a/src/gui/buildinfo.h b/src/gui/buildinfo.h index 3ef9377dc..154cba8bb 100644 --- a/src/gui/buildinfo.h +++ b/src/gui/buildinfo.h @@ -69,7 +69,7 @@ class CBuildInfo : public CMenuTarget, public CComponentsWindow BI_TYPE_IDS }; - CBuildInfo(); + CBuildInfo(bool show = false); ///assigns text Font type void setFontType(Font* font_text);