diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-28 21:29:11 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-28 21:29:11 +0200 |
commit | ace17533c9a847678e8eda50135403e51a132c86 (patch) | |
tree | d6e1c883337da4e9aca57924cf51f04ce8917216 /indra/newview/llpreviewnotecard.cpp | |
parent | 1f1d29e3462fb0adff9342b657160441d5b992d0 (diff) |
MAINT-8833 Don't cause dummy spam
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index fec16998d6..9a0a80147a 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -110,13 +110,15 @@ bool LLPreviewNotecard::saveItem() void LLPreviewNotecard::setEnabled( BOOL enabled ) { - - LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); - - getChildView("Notecard Editor")->setEnabled(enabled); - getChildView("lock")->setVisible( !enabled); - getChildView("desc")->setEnabled(enabled); - getChildView("Save")->setEnabled(enabled && editor && (!editor->isPristine())); + LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor"); + // editor is part of xml, if it doesn't exists, nothing else does + if (editor) + { + editor->setEnabled(enabled); + getChildView("lock")->setVisible( !enabled); + getChildView("desc")->setEnabled(enabled); + getChildView("Save")->setEnabled(enabled && (!editor->isPristine())); + } } |