aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2016-02-09 18:39:08 +0100
committerAngelo Naselli <anaselli@linux.it>2016-02-12 21:24:19 +0100
commit3e04f2b8617b644d5b98a5e503b00be8d7c388f2 (patch)
tree5d2bab472723f5c46a913de5d9ea830420007101 /lib/ManaTools
parentcc4cb7af4a67a51b0366ed549335e7f05e6b6fd0 (diff)
downloadmanatools-3e04f2b8617b644d5b98a5e503b00be8d7c388f2.tar
manatools-3e04f2b8617b644d5b98a5e503b00be8d7c388f2.tar.gz
manatools-3e04f2b8617b644d5b98a5e503b00be8d7c388f2.tar.bz2
manatools-3e04f2b8617b644d5b98a5e503b00be8d7c388f2.tar.xz
manatools-3e04f2b8617b644d5b98a5e503b00be8d7c388f2.zip
Avoid to select first package of the group when a package is checked
Diffstat (limited to 'lib/ManaTools')
-rw-r--r--lib/ManaTools/Rpmdragora/gui.pm22
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/ManaTools/Rpmdragora/gui.pm b/lib/ManaTools/Rpmdragora/gui.pm
index 7a1f73dc..9a79de3d 100644
--- a/lib/ManaTools/Rpmdragora/gui.pm
+++ b/lib/ManaTools/Rpmdragora/gui.pm
@@ -951,7 +951,7 @@ sub fast_toggle {
my $old_status = node_state($name);
- #$DB::single = 1;
+ # $DB::single = 1;
# my $old_state;
# if($item->checked()){
@@ -960,6 +960,9 @@ sub fast_toggle {
# $old_state = "to_remove";
# }
toggle_nodes($w->{tree}, $w->{detail_list}, \&set_leaf_state, $old_status, $name);
+
+ $w->{detail_list}->selectItem($item, 1);
+
update_size($common);
};
@@ -1013,7 +1016,22 @@ sub ask_browse_tree_given_widgets_for_rpmdragora {
carp "TODO ==================> ADD NODES - add packages (" . scalar(@nodes) . ") \n";
yui::YUI::app()->busyCursor();
- my $lastItem = $w->{detail_list}->selectedItem() ? $w->{detail_list}->selectedItem()->label() : "";
+ my $it = undef;
+
+ if ($w->{detail_list}->selectedItem() && yui::toYTableItem($w->{detail_list}->selectedItem())->cellCount()) {
+ $it = yui::toYTableItem($w->{detail_list}->selectedItem());
+ }
+ elsif ($w->{detail_list}->changedItem() && yui::toYTableItem($w->{detail_list}->changedItem())->cellCount()) {
+ $it = yui::toYTableItem($w->{detail_list}->changedItem());
+ }
+ # name-version-release.arch
+ my $lastItem = $it ?
+ ($it->cell(0)->label() . "-" .
+ $it->cell(2)->label() . "-" .
+ $it->cell(3)->label() . "." .
+ $it->cell(4)->label()) :
+ "";
+
$w->{detail_list}->startMultipleChanges();
$w->{detail_list}->deleteAllItems();
my $itemColl = new yui::YItemCollection;