aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-08-27 21:25:40 +0200
committerAngelo Naselli <anaselli@linux.it>2015-08-27 21:25:40 +0200
commit964fb2ee43246d3c0dc879a23c86ff71253fa714 (patch)
tree78d59deb48ec4a68ff281041aef7d4cf61eac13c /lib/ManaTools
parentb3b32f7e239eaff0a2dcfc72141498ca1b7d91ce (diff)
downloadmanatools-964fb2ee43246d3c0dc879a23c86ff71253fa714.tar
manatools-964fb2ee43246d3c0dc879a23c86ff71253fa714.tar.gz
manatools-964fb2ee43246d3c0dc879a23c86ff71253fa714.tar.bz2
manatools-964fb2ee43246d3c0dc879a23c86ff71253fa714.tar.xz
manatools-964fb2ee43246d3c0dc879a23c86ff71253fa714.zip
Fixed Tab refreshment
Added missed comments
Diffstat (limited to 'lib/ManaTools')
-rw-r--r--lib/ManaTools/Shared/GUI/ExtTab.pm18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/ManaTools/Shared/GUI/ExtTab.pm b/lib/ManaTools/Shared/GUI/ExtTab.pm
index 1e3c91fa..b3f59015 100644
--- a/lib/ManaTools/Shared/GUI/ExtTab.pm
+++ b/lib/ManaTools/Shared/GUI/ExtTab.pm
@@ -81,7 +81,10 @@ use yui;
=head3 INPUT
hash ref containing
- optfactory: optfactory needed to create a YDumbTab
+ factory: factory needed to create a widgets
+ optFactory: optFactory needed to create a YDumbTab
+ mainw: main dialog/window needed to redraw selected tab
+ parentWidget: parent widget needed to build the YDumbTab
callback: optional parameter to execute a callback
@@ -105,6 +108,12 @@ has 'optFactory' => (
required => 1,
);
+has 'mainw' => (
+ is => 'ro',
+ isa => 'Maybe[yui::YDialog]',
+ required => 1,
+);
+
has 'parentWidget' => (
is => 'ro',
isa => 'yui::YWidget',
@@ -301,12 +310,19 @@ sub findItem {
sub buildItem {
my $self = shift;
my $item = shift;
+
+ # lock windows for multiple changes
+ $self->mainw->startMultipleChanges();
# clear out replacepoint
$self->container->deleteChildren();
# build item's widgetbuilder
my $builder = $item->builder();
$builder->($self->factory, $self->optFactory, $self->container, $item->backend()) if (defined $builder);
$self->container->showChild();
+ # recalulate layout
+ $self->mainw->recalcLayout();
+ # unlock windows for multiple changes
+ $self->mainw->doneMultipleChanges();
}
#=============================================================