From e35195252ff797f874f7147b9b5355d2726d8ea7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 23 Jul 2017 21:37:42 +0300 Subject: [PATCH] Changed: Fix issue with table background images not displaying --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 0c082ae58..dba5283a1 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -450,6 +450,19 @@ namespace NLGUI { string finalUrl = upgradeInsecureUrl(getAbsoluteUrl(url)); + // use requested url for local name (cache) + string dest = localImageName(url); + #ifdef LOG_DL + nlwarning("add to download '%s' dest '%s' img %p", finalUrl.c_str(), dest.c_str(), img); + #endif + + // Display cached image while downloading new + if (type != TImageType::OverImage && CFile::fileExists(dest)) + { + setImage(img, dest, type); + setImageSize(img, style); + } + // Search if we are not already downloading this url. for(uint i = 0; i < Curls.size(); i++) { @@ -463,12 +476,6 @@ namespace NLGUI } } - // use requested url for local name (cache) - string dest = localImageName(url); - #ifdef LOG_DL - nlwarning("add to download '%s' dest '%s' img %p", finalUrl.c_str(), dest.c_str(), img); - #endif - Curls.push_back(CDataDownload(finalUrl, dest, ImgType, img, "", "", style, type)); if (Curls.size() < options.curlMaxConnections) { if (!startCurlDownload(Curls.back()))