diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-08-21 18:59:03 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2013-02-18 21:04:28 (GMT) |
commit | 4d34f5c5381360ac100ab35c22132238f2809a4e (patch) | |
tree | 3e9ee71bce5198662f4efd42bfb30dbfc3b3f3ce /src/FbTk | |
parent | 2c5d073c1e3c006d1017f94ead28c98ea29e8354 (diff) | |
download | fluxbox_pavel-4d34f5c5381360ac100ab35c22132238f2809a4e.zip fluxbox_pavel-4d34f5c5381360ac100ab35c22132238f2809a4e.tar.bz2 |
Don't spam with the "Unable to convert ... from nil" messageson-1.3.4
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Resource.hh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh index b729ad4..e3e8cc1 100644 --- a/src/FbTk/Resource.hh +++ b/src/FbTk/Resource.hh | |||
@@ -257,9 +257,13 @@ public: | |||
257 | 257 | ||
258 | virtual void setFromLua(lua::state &l) { | 258 | virtual void setFromLua(lua::state &l) { |
259 | try { | 259 | try { |
260 | m_value = Traits::fromLua(l); | 260 | if(l.isnil(-1)) |
261 | m_rm->resourceChanged(*this); | 261 | setDefaultValue(); |
262 | m_modified_sig.emit(m_value); | 262 | else { |
263 | m_value = Traits::fromLua(l); | ||
264 | m_rm->resourceChanged(*this); | ||
265 | m_modified_sig.emit(m_value); | ||
266 | } | ||
263 | } | 267 | } |
264 | catch(ConversionError &e) { | 268 | catch(ConversionError &e) { |
265 | std::cerr << name() << ": " << e.what() << std::endl; | 269 | std::cerr << name() << ": " << e.what() << std::endl; |