From 5fcd45b633c978db5824291564d39e30ab171d59 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 3 Oct 2016 21:37:54 +0200 Subject: [PATCH] CImageInfo: fix initial height of first info item On first view of imageinfo window, no image name was visibla. Height for this item was not assigned. Height was only assigned at the second attempt. --- src/gui/imageinfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 93c6c7dee..282a1acdc 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -352,7 +352,7 @@ void CImageInfo::InitInfos() //create label and text items for (size_t i=0; igetWidth(), item_height, g_Locale->getText(v_info[i].caption), v_info[i].info_text); + CComponentsExtTextForm *item = new CComponentsExtTextForm(1, CC_APPEND, cc_info->getWidth(), 0, g_Locale->getText(v_info[i].caption), v_info[i].info_text); item->setLabelWidthPercent(20); if (!item_font){ @@ -360,6 +360,7 @@ void CImageInfo::InitInfos() //calculate initial height for info form item_height = item_font->getHeight(); } + item->setHeight(item_height); cc_info->setHeight(v_info.size()*item_height); if ((i == 0) && (item->getYPos() == CC_APPEND))