Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
678cdc50
Commit
678cdc50
authored
Jul 13, 2015
by
Christian Schulte zu Berge
Browse files
Fixed LuaTreeItemTable to also show metatables of the corresponding Lua table.
refs #643
parent
38884324
Changes
1
Show whitespace changes
Inline
Side-by-side
application/gui/luatablewidget.cpp
View file @
678cdc50
...
...
@@ -152,6 +152,13 @@ namespace campvis {
,
_thisTable
(
thisTable
)
,
_isMetatable
(
isMetatable
)
{
// this casting here is not really that beautiful, but does it's job:
// somehow, we need to get the parent table to check for the metatable.
auto
ltit
=
dynamic_cast
<
LuaTreeItemTable
*>
(
getParent
());
if
(
ltit
&&
ltit
->
_thisTable
->
hasMetatable
(
_name
))
{
new
LuaTreeItemTable
(
true
,
ltit
->
_thisTable
->
getMetatable
(
name
),
name
,
LUA_TTABLE
,
this
);
}
auto
&
valueMap
=
thisTable
->
getValueMap
();
for
(
auto
it
=
valueMap
.
cbegin
();
it
!=
valueMap
.
cend
();
++
it
)
{
const
std
::
string
&
itemName
=
it
->
first
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment