diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AdminPanel/Shared/GUI.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/AdminPanel/Shared/GUI.pm b/lib/AdminPanel/Shared/GUI.pm index 493c8a7d..00d94157 100644 --- a/lib/AdminPanel/Shared/GUI.pm +++ b/lib/AdminPanel/Shared/GUI.pm @@ -736,16 +736,16 @@ sub ask_fromTreeList { } elsif ($widget == $selectButton) { my $item = $treeWidget->selectedItem(); + my $getChoice = 1; + if (!exists $info->{any_item_selection} || $info->{any_item_selection} != 0) { + if ($item) { + $getChoice = (!$item->hasChildren()); + } + } if ($info->{skip_path} && $info->{skip_path} != 0) { - $choice = $item->label() if ($item); + $choice = $item->label() if ($item && $getChoice); } else { - my $getChoice = 1; - if (!exists $info->{any_item_selection} || $info->{any_item_selection} != 0) { - if ($item) { - $getChoice = (!$item->hasChildren()); - } - } if ($getChoice) { my $separator = exists $info->{item_separator} ? $info->{item_separator} : '/'; if ($item) { |