From 882bdf5b2d1a7098a0e2d012c9e250a135e9e6ec Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 20 Aug 2016 09:54:12 +0200 Subject: [PATCH] supplement to 5ac8d0085b86fd5b40bf772187548820adc1f277 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/27ddf8935d36ff8a73ee9ac7aa24d41e53c31921 Author: Jacek Jendrzej Date: 2016-08-20 (Sat, 20 Aug 2016) --- src/gui/lua/lua_cc_text.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 243aeaf3a..e4c8d637e 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -140,14 +140,14 @@ int CLuaInstCCText::CCTextNew(lua_State *L) CComponentsForm* pw = (parent && parent->w) ? parent->w->getBodyObject() : NULL; if(pw){ - if(dx == -1) + if(dx < 1) dx = pw->getHeight(); - if(dy == -1) + if(dy < 1) dy = pw->getWidth(); } - if(dx == -1) + if(dx < 1) dx = 100; - if(dy == -1) + if(dy < 1) dy = 100; CLuaCCText **udata = (CLuaCCText **) lua_newuserdata(L, sizeof(CLuaCCText *));