- Fixes a crash where trying to get a preview image when a new source is being loaded will cause a crash
- Mirrors enableUI in the main window.
git-svn-id: svn://localhost/HandBrake/trunk@3471
b64f7644-9d1e-0410-96f1-
a4d463321fa5
}
- if (b) {
+ if (b)
+ {
/* if we're enabling the interface, check if the audio mixdown controls need to be enabled or not */
/* these will have been enabled by the mass control enablement above anyway, so we're sense-checking it here */
[self setEnabledStateOfAudioMixdownControls:nil];
/* we also call calculatePictureSizing here to sense check if we already have vfr selected */
[self calculatePictureSizing:nil];
-
- } else {
+ /* Also enable the preview window hud controls */
+ [fPictureController enablePreviewHudControls];
+ }
+ else
+ {
[fPresetsOutlineView setEnabled: NO];
-
- }
+ [fPictureController disablePreviewHudControls];
+ }
[self videoMatrixChanged:nil];
[fAdvancedOptions enableUI:b];
- (IBAction)goWindowedScreen:(id)sender;
/* HUD overlay */
+- (void) enableHudControls;
+- (void) disableHudControls;
+
- (void) startHudTimer;
- (void) stopHudTimer;
}
#pragma mark Hud Control Overlay
+/* enableHudControls and disableHudControls are used to sync enableUI
+ * in HBController so that during a scan we do not attempt to access source
+ * images, etc. which can cause a crash. In general this ui behavior will mirror
+ * the main window ui's enableUI method and in fact is called from there */
+- (void) enableHudControls
+{
+ [fPictureSlider setEnabled:YES];
+ [fScaleToScreenToggleButton setEnabled:YES];
+ [fCreatePreviewMovieButton setEnabled:YES];
+ [fGoToStillPreviewButton setEnabled:YES];
+ [fHBController writeToActivityLog: "Preview: Enabling HUD Controls"];
+}
+
+- (void) disableHudControls
+{
+ [fPictureSlider setEnabled:NO];
+ [fScaleToScreenToggleButton setEnabled:NO];
+ [fCreatePreviewMovieButton setEnabled:NO];
+ [fGoToStillPreviewButton setEnabled:NO];
+ [fHBController writeToActivityLog: "Preview: Disabling HUD Controls"];
+}
+
- (void) mouseMoved:(NSEvent *)theEvent
{
[super mouseMoved:theEvent];
- (IBAction) resizeInspectorForTab: (id)sender;
- (IBAction) showPreviewWindow: (id)sender;
+- (void) enablePreviewHudControls;
+- (void) disablePreviewHudControls;
- (IBAction) adjustSizingDisplay: (id) sender;
[fPreviewController showWindow:sender];
}
+- (void) enablePreviewHudControls
+{
+ [fPreviewController enableHudControls];
+}
+- (void) disablePreviewHudControls
+{
+ [fPreviewController disableHudControls];
+}
- (void) setToWindowedMode
{