From 02631e35d61c543dcdfaa6c72f6572a18326ca9d Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Wed, 25 Jun 2014 22:57:30 +0200 Subject: fixed any_item_selection management, was missed if skip_path is enabled --- lib/AdminPanel/Shared/GUI.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/AdminPanel/Shared/GUI.pm b/lib/AdminPanel/Shared/GUI.pm index 493c8a7..00d9415 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) { -- cgit v1.2.1