summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBPreviewController.m10
-rw-r--r--macosx/HBPreviewGenerator.h2
-rw-r--r--macosx/HBPreviewGenerator.m4
3 files changed, 14 insertions, 2 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m
index c92bc4e8f..43128ac20 100644
--- a/macosx/HBPreviewController.m
+++ b/macosx/HBPreviewController.m
@@ -232,6 +232,7 @@ typedef enum ViewMode : NSUInteger {
{
_title = title;
+ self.generator.delegate = nil;
[self.generator cancel];
self.generator = nil;
@@ -244,6 +245,7 @@ typedef enum ViewMode : NSUInteger {
[fPictureSlider setMaxValue: self.generator.imagesCount - 1.0];
[fPictureSlider setNumberOfTickMarks: self.generator.imagesCount];
+ [self switchViewToMode:ViewModePicturePreview];
[self displayPreview];
}
}
@@ -466,7 +468,6 @@ typedef enum ViewMode : NSUInteger {
{
if (self.currentViewMode == ViewModeEncoding)
{
- [self.generator cancel];
[self toggleBoxes:@[fPictureControlBox, fEncodingControlBox]
usingIndexes:[NSIndexSet indexSetWithIndex:0]];
[fMovieCreationProgressIndicator stopAnimation:self];
@@ -858,6 +859,11 @@ typedef enum ViewMode : NSUInteger {
[fMovieCreationProgressIndicator setDoubleValue: progress];
}
+- (void)didCancelMovieCreation
+{
+ [self switchViewToMode:ViewModePicturePreview];
+}
+
- (void) didCreateMovieAtURL: (NSURL *) fileURL
{
/* Load the new movie into fMovieView */
@@ -919,7 +925,7 @@ typedef enum ViewMode : NSUInteger {
- (IBAction) cancelCreateMoviePreview: (id) sender
{
- [self switchViewToMode:ViewModePicturePreview];
+ [self.generator cancel];
}
- (IBAction) createMoviePreview: (id) sender
diff --git a/macosx/HBPreviewGenerator.h b/macosx/HBPreviewGenerator.h
index 438d078aa..72e3b5153 100644
--- a/macosx/HBPreviewGenerator.h
+++ b/macosx/HBPreviewGenerator.h
@@ -10,6 +10,8 @@
@protocol HBPreviewGeneratorDelegate <NSObject>
- (void) didCreateMovieAtURL: (NSURL *) fileURL;
+- (void) didCancelMovieCreation;
+
- (void) updateProgress: (double) progress info: (NSString *) progressInfo;
@end
diff --git a/macosx/HBPreviewGenerator.m b/macosx/HBPreviewGenerator.m
index 64effac2c..dce77e1aa 100644
--- a/macosx/HBPreviewGenerator.m
+++ b/macosx/HBPreviewGenerator.m
@@ -390,6 +390,10 @@ typedef enum EncodeState : NSUInteger {
{
[self.delegate didCreateMovieAtURL:self.fileURL];
}
+ else
+ {
+ [self.delegate didCancelMovieCreation];
+ }
self.encodeState = EncodeStateIdle;