aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets/dialogshell.rb')
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialogshell.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb b/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
index 4736ebab77..88b9a97094 100644
--- a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
+++ b/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb
@@ -56,7 +56,9 @@ class Tk::Iwidgets::Dialogshell
keys = tag
tag = nil
end
- unless tag
+ if tag
+ tag = Tk::Itk::Component.new(self, tagid(tag))
+ else
tag = Tk::Itk::Component.new(self)
end
tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
@@ -87,7 +89,9 @@ class Tk::Iwidgets::Dialogshell
keys = tag
tag = nil
end
- unless tag
+ if tag
+ tag = Tk::Itk::Component.new(self, tagid(tag))
+ else
tag = Tk::Itk::Component.new(self)
end
tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))