widget/hintbox.cpp: add explicit init of var picon

Had some issues while compile with gcc 7.x.
Exact data type was expected.
This commit is contained in:
2017-12-04 20:14:02 +01:00
parent e9883cbd2d
commit 882a4654a8

View File

@@ -265,6 +265,9 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
/* set required font and line height */
Font* item_font = !font_text ? hb_font : font_text;
/* set picon */
string picon = Picon;
/* pre define required info height depends of lines and minimal needed height*/
int line_breaks = CTextBox::getLines(Text);
int h_font = item_font->getHeight();
@@ -276,7 +279,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
int txt_mode = text_mode;
/* remove CENTER mode if picon defined */
if (!Picon.empty() && (txt_mode & CTextBox::CENTER)){
if (!picon.empty() && (txt_mode & CTextBox::CENTER)){
txt_mode &= ~CTextBox::CENTER;
}
@@ -313,7 +316,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
color_text);
/* define picon and disable bg */
info_box->setPicture(Picon);
info_box->setPicture(picon);
info_box->doPaintBg(false);
/* recalculate new hintbox dimensions and position*/