diff --git a/src/windows/main_window.py b/src/windows/main_window.py index bf4bd2d9da..a3aa1d4820 100644 --- a/src/windows/main_window.py +++ b/src/windows/main_window.py @@ -2795,7 +2795,7 @@ def setup_toolbars(self): self.caption_model_row = None # Get project's initial zoom value - initial_scale = get_app().project.get("scale") or 15.0 + initial_scale = float(get_app().project.get("scale") or 15.0) # Setup Zoom Slider widget from windows.views.zoom_slider import ZoomSlider diff --git a/src/windows/views/webview.py b/src/windows/views/webview.py index 4b7bb4296c..cd1d7d47ff 100644 --- a/src/windows/views/webview.py +++ b/src/windows/views/webview.py @@ -230,7 +230,7 @@ def changed(self, action): # Reset the scale when loading new JSON if action.type == "load": # Set the scale again (to project setting) - initial_scale = get_app().project.get("scale") or 15.0 + initial_scale = float(get_app().project.get("scale") or 15.0) self.window.sliderZoomWidget.setZoomFactor(initial_scale) @pyqtSlot(str, bool, bool, bool) @@ -2829,7 +2829,7 @@ def update_zoom(self, newScale): self.redraw_audio_timer.start() # Only update scale if different - current_scale = float(get_app().project.get("scale")) + current_scale = float(get_app().project.get("scale") or 15.0) # Save current zoom if newScale != current_scale: