diff --git a/main.py b/main.py index b700ad7..77fc9cc 100644 --- a/main.py +++ b/main.py @@ -299,7 +299,7 @@ class Main(QtCore.QObject): res = self.resolutions[resIndex].split('x') self.settings.setValue('outputWidth',res[0]) self.settings.setValue('outputHeight',res[1]) - self.drawPreview + self.drawPreview() def drawPreview(self): #self.settings.setValue('visLayout', self.window.comboBox_visLayout.currentIndex()) @@ -350,7 +350,6 @@ class Main(QtCore.QObject): self.window.stackedWidget.removeWidget(self.pages[index]) self.window.listWidget_componentList.takeItem(index) self.selectedComponents.pop(index) - print(self.selectedComponents) self.drawPreview() def changeComponentWidget(self): diff --git a/preview_thread.py b/preview_thread.py index e8b2021..7a7e619 100644 --- a/preview_thread.py +++ b/preview_thread.py @@ -28,7 +28,6 @@ class Worker(QtCore.QObject): "backgroundImage": backgroundImage, "components": components, } - print(components) self.queue.put(dic) @pyqtSlot() @@ -51,16 +50,15 @@ class Worker(QtCore.QObject): bgImage = bgImage[0] im = self.core.drawBaseImage(bgImage) - frame = Image.new("RGBA", (1280, 720),(0,0,0,255)) + width = int(self.core.settings.value('outputWidth')) + height = int(self.core.settings.value('outputHeight')) + frame = Image.new("RGBA", (width, height),(0,0,0,255)) frame.paste(im) componentWidgets = [self.stackedWidget.widget(i) for i in range(self.stackedWidget.count())] components = nextPreviewInformation["components"] - print(components) - print(componentWidgets) for component, componentWidget in zip(components, componentWidgets): - print('drawing') newFrame = Image.alpha_composite(frame,component.previewRender(self, componentWidget)) frame = Image.alpha_composite(frame,newFrame)