Another port from CoolViewer of the notecard floater, featuring a menu and search/replace.

This commit is contained in:
Player Dagostino
2011-08-02 20:07:55 +02:00
parent bcc541f3f2
commit f3d6931fc3
8 changed files with 386 additions and 191 deletions

View File

@@ -46,6 +46,9 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "lldbstrings.h"
#include "llfloatersearchreplace.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llagent.h"
#include "llvoavatar.h"
#include "llselectmgr.h"
@@ -576,6 +579,24 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
{
opened_preview->loadAsset();
}
LLFloater* search_floater = LLFloaterSearchReplace::getInstance();
if (search_floater && search_floater->getDependee() == this)
{
LLPreviewNotecard* notecard_preview; LLPreviewLSL* script_preview;
if ((notecard_preview = dynamic_cast<LLPreviewNotecard*>(opened_preview)) != NULL)
{
LLFloaterSearchReplace::show(notecard_preview->getEditor());
}
else if ((script_preview = dynamic_cast<LLPreviewLSL*>(opened_preview)) != NULL)
{
LLFloaterSearchReplace::show(script_preview->getEditor());
}
else
{
search_floater->setVisible(FALSE);
}
}
}
//static