… | |
… | |
573 | |
573 | |
574 | sub update_containers { |
574 | sub update_containers { |
575 | my ($self) = @_; |
575 | my ($self) = @_; |
576 | |
576 | |
577 | $CFClient::UI::ROOT->on_refresh ("update_containers_$self" => sub { |
577 | $CFClient::UI::ROOT->on_refresh ("update_containers_$self" => sub { |
578 | # TODO: scara had a bug where $self->{uipdate_container} was not defined |
|
|
579 | # but this should not possibly happen? |
|
|
580 | for my $tag (keys %{ delete $self->{update_container} }) { |
578 | for my $tag (keys %{ delete $self->{update_container} }) { |
581 | if ($tag == 0) { |
579 | if ($tag == 0) { |
582 | update_floorbox; |
580 | update_floorbox; |
583 | $::INVR->set_items ($self->{container}{0}) |
581 | $::INVR->set_items ($self->{container}{0}) |
584 | if $tag == $self->{open_container}; |
582 | if $tag == $self->{open_container}; |
… | |
… | |
607 | } |
605 | } |
608 | |
606 | |
609 | sub item_delete { |
607 | sub item_delete { |
610 | my ($self, @items) = @_; |
608 | my ($self, @items) = @_; |
611 | |
609 | |
612 | $self->{update_container}{$_->{tag}}++ |
610 | $self->{update_container}{$_->{container}}++ |
613 | for @items; |
611 | for @items; |
614 | |
612 | |
615 | $self->update_containers; |
613 | $self->update_containers; |
616 | } |
614 | } |
617 | |
615 | |