Skip Menu |

This queue is for tickets about the Prima CPAN distribution.

Report information
The Basics
Id: 110289
Status: resolved
Priority: 0/
Queue: Prima

People
Owner: Nobody in particular
Requestors: perl [...] josavolk.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: examples/iv.pl new windows issue
Date: Fri, 11 Dec 2015 14:09:19 +0100
To: bug-Prima [...] rt.cpan.org
From: "Volker Mertens" <perl [...] josavolk.de>
Dear Dmitry,
 
I found an issue with not initialized entries in the Prima::Window hash in
Prima/examples/iv.pl.
 
If the "New window" menu entry is used and then in the new window the image
will be changed by "Open", the menu will be added (menuadd) to the window again.
At the same time, the Prima::Window->{conversion} is not defined.
The 2 settings in newwindow solve the problem for me.
 
Thank you for the examples, they are very helpful!
 
Best regards,
Volker
 
sub newwindow {     my ( $self, $filename, $i) = @_;     my $w = Prima::Window-> create(         onDestroy => \&iv_destroy,         menuItems => $self-> menuItems,         onMouseWheel => sub { iv_mousewheel( shift-> IV, @_)},         size         => [ $i-> width + 50, $i-> height + 50],     );     $winCount++;     $w-> insert( ImageViewer =>         size   => [ $w-> size],         %iv_prf,     );     $w-> IV-> image( $i);     $w-> IV-> {fileName} = $filename;     $w-> {omenuID} = $self-> {omenuID};
#####
        $w->IV->{menuadded} = 1;         $w->{conversion} = ict::Optimized;
#####     $w-> select;     status($w); }
 
fixed, thank you!