diff options
author | Merov Linden <merov@lindenlab.com> | 2014-01-16 17:52:14 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-01-16 17:52:14 -0800 |
commit | 91f401fa2de8c78da7c83561501a1be993588867 (patch) | |
tree | d75493b05bf65b3ee90c8d15d77d52bf99423333 /indra/newview/llsnapshotlivepreview.cpp | |
parent | e0412a7d987e046c48f80992c3c7b2bdb3373201 (diff) |
ACME-1237 : Use translation service for filter names so they can be localized and as also look proper in English. General filter manager cleanup
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index c38798bbea..21abdd2675 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -591,11 +591,17 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) // Filter the thumbnail if (getFilter() != "") { - LLImageFilter filter; std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); - filter.loadFromFile(filter_path); - filter.executeFilter(raw); - //raw->filterGrayScale(); + if (filter_path != "") + { + LLImageFilter filter; + filter.loadFromFile(filter_path); + filter.executeFilter(raw); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } } mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); mThumbnailUpToDate = TRUE ; @@ -704,11 +710,17 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // Apply the filter to mPreviewImage if (previewp->getFilter() != "") { - LLImageFilter filter; std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(previewp->getFilter()); - filter.loadFromFile(filter_path); - filter.executeFilter(previewp->mPreviewImage); - //previewp->mPreviewImage->filterGrayScale(); + if (filter_path != "") + { + LLImageFilter filter; + filter.loadFromFile(filter_path); + filter.executeFilter(previewp->mPreviewImage); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << previewp->getFilter() << llendl; + } } // delete any existing image |