mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-17 08:43:11 +00:00
Fix compilation when ENABLE_SCRIPTING is defined
This commit is contained in:
parent
7d3e6f2ad3
commit
bd18248be9
@ -11,11 +11,14 @@
|
||||
#include "app/commands/new_params.h"
|
||||
|
||||
#include "app/doc_exporter.h"
|
||||
#include "app/script/luacpp.h"
|
||||
#include "app/sprite_sheet_type.h"
|
||||
#include "base/convert_to.h"
|
||||
#include "base/string.h"
|
||||
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
#include "app/script/luacpp.h"
|
||||
#endif
|
||||
|
||||
namespace app {
|
||||
|
||||
template<>
|
||||
@ -106,19 +109,6 @@ void Param<app::DocExporter::DataFormat>::fromLua(lua_State* L, int index)
|
||||
setValue((app::DocExporter::DataFormat)lua_tointeger(L, index));
|
||||
}
|
||||
|
||||
void CommandWithNewParamsBase::onLoadParams(const Params& params)
|
||||
{
|
||||
if (m_skipLoadParams) {
|
||||
m_skipLoadParams = false;
|
||||
return;
|
||||
}
|
||||
onResetValues();
|
||||
for (const auto& pair : params) {
|
||||
if (ParamBase* p = onGetParam(pair.first))
|
||||
p->fromString(pair.second);
|
||||
}
|
||||
}
|
||||
|
||||
void CommandWithNewParamsBase::loadParamsFromLuaTable(lua_State* L, int index)
|
||||
{
|
||||
onResetValues();
|
||||
@ -137,4 +127,19 @@ void CommandWithNewParamsBase::loadParamsFromLuaTable(lua_State* L, int index)
|
||||
|
||||
#endif
|
||||
|
||||
void CommandWithNewParamsBase::onLoadParams(const Params& params)
|
||||
{
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
if (m_skipLoadParams) {
|
||||
m_skipLoadParams = false;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
onResetValues();
|
||||
for (const auto& pair : params) {
|
||||
if (ParamBase* p = onGetParam(pair.first))
|
||||
p->fromString(pair.second);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace app
|
||||
|
Loading…
x
Reference in New Issue
Block a user