From af4db882b8b33360465c09ac4b8381d52bec3594 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 7 May 2009 17:29:17 +0000 Subject: [PATCH] fix regeneration of packed snippet --- lib/WebGUI/Asset/Snippet.pm | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Asset/Snippet.pm b/lib/WebGUI/Asset/Snippet.pm index 867986de6..80bfa2267 100644 --- a/lib/WebGUI/Asset/Snippet.pm +++ b/lib/WebGUI/Asset/Snippet.pm @@ -79,10 +79,11 @@ sub definition { defaultValue => undef, }, usePacked => { - tab => 'properties', - fieldType => 'yesNo', - label => $i18n->get('usePacked label'), - hoverHelp => $i18n->get('usePacked description'), + tab => 'properties', + fieldType => 'yesNo', + label => $i18n->get('usePacked label'), + hoverHelp => $i18n->get('usePacked description'), + defaultValue => 0, }, cacheTimeout => { tab => "display", @@ -120,6 +121,19 @@ sub definition { return $class->SUPER::definition($session,$definition); } +#------------------------------------------------------------------- + +=head2 addRevision ( properties, ... ) + +Force the packed snippet to be regenerated. + +=cut + +sub addRevision { + my ( $self, $properties, @args ) = @_; + delete $properties->{ snippetPacked }; + return $self->SUPER::addRevision( $properties, @args ); +} #-------------------------------------------------------------------