Skip to content

Commit 6aeb663

Browse files
committed
Modify copy_widget to allow non-visible widgets
1 parent 311294b commit 6aeb663

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ttkwidgets/utilities.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ def copy_widget(widget, new_parent, level=0):
6060
temp = widget.place_info()
6161
del temp['in']
6262
rv.place(**temp)
63-
else: # if geometry manager is pack
63+
elif widget.pack_info(): # if geometry manager is pack
6464
temp = widget.pack_info()
6565
del temp['in']
6666
rv.pack(**temp)
67+
else: # No geometry manager configured
68+
pass
6769
level += 1
6870

6971
if widget.pack_slaves(): # subwidgets are using the pack() geometry manager

0 commit comments

Comments
 (0)