Skip to content

Commit

Permalink
Merge pull request #268 from erosennin/props-apply
Browse files Browse the repository at this point in the history
Apply only changed properties instead of reapplying them all.
  • Loading branch information
hwhw committed Nov 15, 2014
2 parents e7de105 + 35a0782 commit 4a75e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int setIntProperty(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
const char *propName = luaL_checkstring(L, 2);
int value = luaL_checkint(L, 3);
CRPropRef props = doc->text_view->propsGetCurrent();
CRPropRef props = LVCreatePropsContainer();
props->setInt(propName, value);
doc->text_view->propsApply(props);
return 0;
Expand All @@ -373,7 +373,7 @@ static int setStringProperty(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
const char *propName = luaL_checkstring(L, 2);
const char *value = luaL_checkstring(L, 3);
CRPropRef props = doc->text_view->propsGetCurrent();
CRPropRef props = LVCreatePropsContainer();
props->setString(propName, value);
doc->text_view->propsApply(props);
return 0;
Expand Down

0 comments on commit 4a75e35

Please sign in to comment.