Remove exit from context on builder.ExecuteCommand

This commit is contained in:
Oleg Korshul
2025-04-16 11:37:24 +03:00
parent 6a75bc62f0
commit 4c806b07a2
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ namespace NSDoctRenderer
}
bool CDocBuilder::ExecuteCommand(const wchar_t* command, CDocBuilderValue* retValue)
{
return m_pInternal->ExecuteCommand(command, retValue);
return m_pInternal->ExecuteCommand(command, retValue, false, false);
}
CDocBuilderContext CDocBuilder::GetContext(bool enterContext)

View File

@ -1275,7 +1275,7 @@ namespace NSDoctRenderer
return SaveFile(nType, path, params);
}
bool ExecuteCommand(const std::wstring& command, CDocBuilderValue* retValue = NULL, const bool& forceExecute = false)
bool ExecuteCommand(const std::wstring& command, CDocBuilderValue* retValue = NULL, const bool& forceExecute = false, const bool& isEnterContext = true)
{
if (command.length() < 7 && !retValue) // minimum command (!!!)
return true;
@ -1291,12 +1291,12 @@ namespace NSDoctRenderer
if (CheckWorker())
{
bool bIsOpenedFromSimpleJSOld = m_bIsOpenedFromSimpleJS;
bool bResult = m_pWorker->ExecuteCommand(command, retValue);
bool bResult = m_pWorker->ExecuteCommand(command, retValue, isEnterContext);
if (!bResult && !bIsOpenedFromSimpleJSOld && m_bIsOpenedFromSimpleJS)
{
RELEASEOBJECT(m_pWorker);
CheckWorker();
return m_pWorker->ExecuteCommand(command, retValue);
return m_pWorker->ExecuteCommand(command, retValue, isEnterContext);
}
else
{