From c2c3f0aa5adf3127b84b3d50da9e1aa655c8a824 Mon Sep 17 00:00:00 2001 From: tassaron Date: Fri, 29 Apr 2022 21:15:17 -0400 Subject: remove extra window properties from window objects instead of windows with properties which are windows, windows now have the UI added directly to them using an argument of `uic.loadUi` Also, DPI scaling moved to MainWindow __init__ --- src/components/spectrum.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/spectrum.py') diff --git a/src/components/spectrum.py b/src/components/spectrum.py index d1f8fb6..91f2afb 100644 --- a/src/components/spectrum.py +++ b/src/components/spectrum.py @@ -30,9 +30,9 @@ class Component(Component): self.previewSize = (214, 120) self.previewPipe = None - if hasattr(self.parent, 'window'): + if hasattr(self.parent, 'lineEdit_audioFile'): # update preview when audio file changes (if genericPreview is off) - self.parent.window.lineEdit_audioFile.textChanged.connect( + self.parent.lineEdit_audioFile.textChanged.connect( self.update ) @@ -123,7 +123,7 @@ class Component(Component): genericPreview = self.settings.value("pref_genericPreview") startPt = 0 if not genericPreview: - inputFile = self.parent.window.lineEdit_audioFile.text() + inputFile = self.parent.lineEdit_audioFile.text() if not inputFile or not os.path.exists(inputFile): return duration = getAudioDuration(inputFile) -- cgit v1.2.3