summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-02-19 19:24:10 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-02-19 19:24:10 +0200
commit785bf264bf035df18b35973a0d5517bbff9c3291 (patch)
tree65b69b294a36a10a4203ddeb511077319bc488c9
parent0b8be887de8e801aa1f4bb1dc1d94c1ac5fd58ef (diff)
Fixed low priority bug EXT-4079 (Lag meter: Colons missing when first opened).
--HG-- branch : product-engine
-rw-r--r--indra/newview/llfloaterlagmeter.cpp15
-rw-r--r--indra/newview/llfloaterlagmeter.h1
2 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 3753dcaaa8..8aa7d6d849 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -122,6 +122,7 @@ BOOL LLFloaterLagMeter::postBuild()
mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
// childSetAction("minimize", onClickShrink, this);
+ updateControls(gSavedSettings.getBOOL("LagMeterShrunk")); // If expanded append colon to the labels (EXT-4079)
return TRUE;
}
@@ -312,17 +313,15 @@ void LLFloaterLagMeter::determineServer()
}
}
-
-void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
+void LLFloaterLagMeter::updateControls(bool shrink)
{
// LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
LLButton * button = getChild<LLButton>("minimize");
S32 delta_width = mMaxWidth -mMinWidth;
LLRect r = getRect();
- bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk");
- if(shrunk)
+ if(!shrink)
{
setTitle(getString("max_title_msg", mStringArgs) );
// make left edge appear to expand
@@ -368,5 +367,11 @@ void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
// self->childSetVisible("server_help", self->mShrunk);
// self->mShrunk = !self->mShrunk;
- gSavedSettings.setBOOL("LagMeterShrunk", !gSavedSettings.getBOOL("LagMeterShrunk"));
+}
+
+void LLFloaterLagMeter::onClickShrink() // toggle "LagMeterShrunk"
+{
+ bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk");
+ updateControls(!shrunk);
+ gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
}
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index 592630636a..c55bee4221 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -51,6 +51,7 @@ private:
void determineClient();
void determineNetwork();
void determineServer();
+ void updateControls(bool shrink);
void onClickShrink();