From 511a004827469cde80201137cccf1acb0eca9f95 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 7 Jan 2016 01:00:48 +0200 Subject: [PATCH 1/2] Fixed: Wrong DD indent in nested list when tag is not closed --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index b4cadc3f4..fd124f478 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -2274,12 +2274,16 @@ namespace NLGUI case HTML_DD: if (!_DL.empty()) { - if (_Indent > ULIndent) - _Indent = _Indent - ULIndent; - else - _Indent = 0; + // parser will process two DD in a row as nested when first DD is not closed + if (_DL.back().DD) + { + if (_Indent > ULIndent) + _Indent = _Indent - ULIndent; + else + _Indent = 0; - _DL.back().DD = false; + _DL.back().DD = false; + } } break; case HTML_SPAN: From ad8059c345de36beebfb32b75a0ebf9513e9d679 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 10 Jan 2016 16:33:42 +0200 Subject: [PATCH 2/2] Fixed: Invalid image width/height on error --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index fd124f478..40dead326 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -3847,7 +3847,7 @@ namespace NLGUI uint32 w, h; CBitmap::loadSize (image, w, h); if (w == 0 || h == 0 || ((!NLMISC::isPowerOf2(w) || !NLMISC::isPowerOf2(h)) && !NL3D::CTextureFile::supportNonPowerOfTwoTextures())) - image.clear(); + image = "web_del.tga"; } else { @@ -3992,6 +3992,13 @@ namespace NLGUI normal = "web_del.tga"; addImageDownload(normalBitmap, ctrlButton, style); } + else + { + uint32 w, h; + CBitmap::loadSize(normal, w, h); + if (w == 0 || h == 0) + normal = "web_del.tga"; + } } }