From 11a3c93ab0c8a9c4849c0478bfab98a9195b8546 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 24 Mar 2015 19:24:33 -0400 Subject: [PATCH] When the user changes cache size in network tab, clear cache too. --- indra/newview/llpanelnetwork.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelnetwork.cpp b/indra/newview/llpanelnetwork.cpp index 05821a8a8..414c9275f 100644 --- a/indra/newview/llpanelnetwork.cpp +++ b/indra/newview/llpanelnetwork.cpp @@ -67,7 +67,11 @@ BOOL LLPanelNetwork::postBuild() childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetCommitCallback("connection_port_enabled", onCommitPort, this); - childSetValue("cache_size", (F32)gSavedSettings.getU32("CacheSize")); + if (LLUICtrl* ctrl = getChild("cache_size")) + { + ctrl->setValue((F32)gSavedSettings.getU32("CacheSize")); + ctrl->setCommitCallback(boost::bind(LLPanelNetwork::onClickClearCache, (void*)NULL)); + } childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS")); childSetValue("tex_bandwidth", gSavedSettings.getF32("HTTPThrottleBandwidth")); childSetValue("http_textures", gSavedSettings.getBOOL("ImagePipelineUseHTTP"));