From a4486b258cbd5e560cf7bec05e515e1ed56179fb Mon Sep 17 00:00:00 2001 From: Jiao Li Date: Tue, 15 Sep 2009 09:34:17 +0000 Subject: EXT-610 Cannot change file type in snapshots floater -- to be reviewed --- indra/newview/llfloatersnapshot.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 13a2594c45..235e819218 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1106,15 +1106,18 @@ LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFlo LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater) { ESnapshotFormat index = SNAPSHOT_FORMAT_PNG; - LLSD value = floater->childGetValue("local_format_combo"); - const std::string id = value.asString(); - if (id == "PNG") - index = SNAPSHOT_FORMAT_PNG; - else if (id == "JPEG") - index = SNAPSHOT_FORMAT_JPEG; - else if (id == "BMP") - index = SNAPSHOT_FORMAT_BMP; - return index; + if(floater->hasChild("local_format_combo")) + { + LLComboBox* local_format_combo = floater->findChild("local_format_combo"); + const std::string id = local_format_combo->getSelectedItemLabel(); + if (id == "PNG") + index = SNAPSHOT_FORMAT_PNG; + else if (id == "JPEG") + index = SNAPSHOT_FORMAT_JPEG; + else if (id == "BMP") + index = SNAPSHOT_FORMAT_BMP; + } + return index; } -- cgit v1.2.3