From 12cb192341787d5af6397a53e73a7a38cb2f417f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 22 Aug 2012 12:41:56 +0200 Subject: [PATCH] CMenuWidget: init instance of CComponentsDetailsLine in constructor --- src/gui/widget/menue.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 37d9028af..84ffc5a07 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -324,7 +324,7 @@ void CMenuWidget::Init(const std::string & Icon, const int mwidth, const mn_widg mglobal = CMenuGlobal::getInstance(); //create CMenuGlobal instance only here frameBuffer = CFrameBuffer::getInstance(); iconfile = Icon; - details_line = NULL; + details_line = new CComponentsDetailLine(); info_box = new CComponentsInfoBox(); //handle select values @@ -1144,15 +1144,13 @@ void CMenuWidget::paintHint(int pos) int imarkh = iheight/2+1; //init details line - if (details_line == NULL) - details_line = new CComponentsDetailLine(xpos, ypos1a, ypos2a, imarkh, markh); - else{ + if (details_line){ details_line->setXPos(xpos); details_line->setYPos(ypos1a); details_line->setYPosDown(ypos2a); + details_line->setHMarkTop(imarkh); details_line->setHMarkDown(markh); - } - details_line->syncSysColors(); + details_line->syncSysColors(); #if 0 details_line->paint(savescreen); #endif