Feature request: When creating a new AO notecard, actually show it!
This commit is contained in:
@@ -51,13 +51,17 @@ public:
|
|||||||
{
|
{
|
||||||
if (!mFileName.empty())
|
if (!mFileName.empty())
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* nc;
|
LLPreviewNotecard* nc = (LLPreviewNotecard*)LLPreview::show(inv_item);
|
||||||
nc = (LLPreviewNotecard*)LLPreview::find(inv_item);
|
if (!nc)
|
||||||
if(nc)
|
|
||||||
{
|
{
|
||||||
nc->open();
|
auto item = gInventory.getItem(inv_item);
|
||||||
LLTextEditor *text = nc->getEditor();
|
open_notecard(item, "Note: " + item->getName(), LLUUID::null, false);
|
||||||
if (text)
|
nc = (LLPreviewNotecard*)LLPreview::find(inv_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nc)
|
||||||
|
{
|
||||||
|
if (LLTextEditor *text = nc->getEditor())
|
||||||
{
|
{
|
||||||
text->clear();
|
text->clear();
|
||||||
text->makePristine();
|
text->makePristine();
|
||||||
@@ -68,7 +72,7 @@ public:
|
|||||||
while (!file.eof())
|
while (!file.eof())
|
||||||
{
|
{
|
||||||
getline(file, line);
|
getline(file, line);
|
||||||
line = line + "\n";
|
line += '\n';
|
||||||
text->insertText(line);
|
text->insertText(line);
|
||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user