Eliminate updateKeywords()

meow-7.2.2
Cinder 2014-05-12 07:23:52 -06:00
parent 6141aa44d0
commit 70aff2154b
2 changed files with 12 additions and 15 deletions

View File

@ -391,8 +391,14 @@ LLScriptEdCore::~LLScriptEdCore()
}
delete mLiveFile;
mRegionChangedCallback.disconnect();
mFileFetchedCallback.disconnect();
if (mRegionChangedCallback.connected())
{
mRegionChangedCallback.disconnect();
}
if (mFileFetchedCallback.connected())
{
mFileFetchedCallback.disconnect();
}
}
BOOL LLScriptEdCore::postBuild()
@ -424,21 +430,13 @@ BOOL LLScriptEdCore::postBuild()
{
processKeywords();
}
mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this));
return TRUE;
}
void LLScriptEdCore::updateKeywords()
{
if (mLive)
{
mEditor->clearSegments();
}
else
{
processLoaded();
mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::processLoaded, this));
}
return TRUE;
}
void LLScriptEdCore::processLoaded()

View File

@ -81,7 +81,6 @@ public:
void initMenu();
void processKeywords();
void processLoaded();
void updateKeywords();
virtual void draw();
/*virtual*/ BOOL postBuild();