EXT-3531 - Ctrl-p doesn't work reliably on login
moved gEditMenuHandler handling to LLEditMenuHandler destructormaster
parent
39ef9e9dd6
commit
dcc5e0a4fa
|
|
@ -37,3 +37,10 @@
|
|||
/* static */
|
||||
LLEditMenuHandler* LLEditMenuHandler::gEditMenuHandler = NULL;
|
||||
|
||||
LLEditMenuHandler::~LLEditMenuHandler()
|
||||
{
|
||||
if (gEditMenuHandler == this)
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class LLEditMenuHandler
|
|||
{
|
||||
public:
|
||||
// this is needed even though this is just an interface class.
|
||||
virtual ~LLEditMenuHandler() {};
|
||||
virtual ~LLEditMenuHandler();
|
||||
|
||||
virtual void undo() {};
|
||||
virtual BOOL canUndo() const { return FALSE; }
|
||||
|
|
|
|||
|
|
@ -192,12 +192,8 @@ LLLineEditor::~LLLineEditor()
|
|||
{
|
||||
mCommitOnFocusLost = FALSE;
|
||||
|
||||
// calls onCommit() while LLLineEditor still valid
|
||||
gFocusMgr.releaseFocusIfNeeded( this );
|
||||
|
||||
if( gEditMenuHandler == this )
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -324,11 +324,6 @@ LLScrollListCtrl::~LLScrollListCtrl()
|
|||
delete mSortCallback;
|
||||
|
||||
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
|
||||
|
||||
if( gEditMenuHandler == this )
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -304,13 +304,7 @@ void LLTextEditor::initFromParams( const LLTextEditor::Params& p)
|
|||
LLTextEditor::~LLTextEditor()
|
||||
{
|
||||
gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() while LLTextEditor still valid
|
||||
|
||||
// Route menu back to the default
|
||||
if( gEditMenuHandler == this )
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
|
||||
|
||||
// Scrollbar is deleted by LLView
|
||||
std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer());
|
||||
|
||||
|
|
|
|||
|
|
@ -276,11 +276,6 @@ LLFolderView::~LLFolderView( void )
|
|||
mRenamer = NULL;
|
||||
mStatusTextBox = NULL;
|
||||
|
||||
if( gEditMenuHandler == this )
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
|
||||
mAutoOpenItems.removeAllNodes();
|
||||
gIdleCallbacks.deleteFunction(idle, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -1473,11 +1473,6 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
|
|||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
LLViewerMediaImpl::~LLViewerMediaImpl()
|
||||
{
|
||||
if( gEditMenuHandler == this )
|
||||
{
|
||||
gEditMenuHandler = NULL;
|
||||
}
|
||||
|
||||
destroyMediaSource();
|
||||
|
||||
LLViewerMediaTexture::removeMediaImplFromTexture(mTextureId) ;
|
||||
|
|
|
|||
Loading…
Reference in New Issue