diff --git a/c++/xycontroller/xycontroller.cpp b/c++/xycontroller/xycontroller.cpp
index 4b32e2b..805e384 100644
--- a/c++/xycontroller/xycontroller.cpp
+++ b/c++/xycontroller/xycontroller.cpp
@@ -21,7 +21,7 @@
# define nullptr (0)
#endif
-#define VERSION "0.8.1"
+#define VERSION "0.9.2"
#include "../jack_utils.hpp"
#include "../midi_queue.hpp"
@@ -685,7 +685,7 @@ protected slots:
QMessageBox::about(this, tr("About XY Controller"), tr("
XY Controller
"
"
Version %1"
"
XY Controller is a simple XY widget that sends and receives data from Jack MIDI.
"
- "
Copyright (C) 2012-2013 falkTX").arg(VERSION));
+ "
Copyright (C) 2012-2022 falkTX").arg(VERSION));
}
void slot_updateScreen()
diff --git a/src/canvaspreviewframe.py b/src/canvaspreviewframe.py
index e04611e..a127be2 100644
--- a/src/canvaspreviewframe.py
+++ b/src/canvaspreviewframe.py
@@ -56,8 +56,8 @@ class CanvasPreviewFrame(QFrame):
self.fScale = 1.0
self.fScene = None
self.fRealParent = None
- self.fFakeWidth = 0.0
- self.fFakeHeight = 0.0
+ self.fFakeWidth = 0
+ self.fFakeHeight = 0
self.fRenderSource = self.getRenderSource()
self.fRenderTarget = QRectF(0, 0, 0, 0)
@@ -70,8 +70,8 @@ class CanvasPreviewFrame(QFrame):
padding = 6
self.fScene = scene
- self.fFakeWidth = float(realWidth) / 15
- self.fFakeHeight = float(realHeight) / 15
+ self.fFakeWidth = int(realWidth / 15)
+ self.fFakeHeight = int(realHeight / 15)
self.setMinimumSize(self.fFakeWidth+padding, self.fFakeHeight+padding)
self.setMaximumSize(self.fFakeWidth*4+padding, self.fFakeHeight+padding)
@@ -166,6 +166,9 @@ class CanvasPreviewFrame(QFrame):
QFrame.mouseReleaseEvent(self, event)
def paintEvent(self, event):
+ if not self.fUseCustomPaint:
+ QFrame.paintEvent(self, event)
+
painter = QPainter(self)
if self.fUseCustomPaint:
@@ -198,12 +201,7 @@ class CanvasPreviewFrame(QFrame):
painter.setBrush(self.fViewBrush)
painter.setPen(self.fViewPen)
- painter.drawRect(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight)
-
- if self.fUseCustomPaint:
- event.accept()
- else:
- QFrame.paintEvent(self, event)
+ painter.drawRect(QRectF(self.fViewRect[iX], self.fViewRect[iY], maxWidth, maxHeight))
def resizeEvent(self, event):
self.fRenderSource = self.getRenderSource()
diff --git a/src/catarina.py b/src/catarina.py
index c5b375c..0fc811b 100755
--- a/src/catarina.py
+++ b/src/catarina.py
@@ -1026,7 +1026,7 @@ class CatarinaMainW(AbstractCanvasJackClass):
@pyqtSlot()
def slot_projectOpen(self):
- path = QFileDialog.getOpenFileName(self, self.tr("Load State"), filter=self.tr("Catarina XML Document (*.xml)"))
+ path, _ = QFileDialog.getOpenFileName(self, self.tr("Load State"), filter=self.tr("Catarina XML Document (*.xml)"))
if path:
self.loadFile(path)
@@ -1039,8 +1039,7 @@ class CatarinaMainW(AbstractCanvasJackClass):
@pyqtSlot()
def slot_projectSaveAs(self):
- path = QFileDialog.getSaveFileName(self, self.tr("Save State"), filter=self.tr("Catarina XML Document (*.xml)"))
- path = path[0]
+ path, _ = QFileDialog.getSaveFileName(self, self.tr("Save State"), filter=self.tr("Catarina XML Document (*.xml)"))
if path:
self.m_save_path = path
self.saveFile(path)
@@ -1261,7 +1260,7 @@ class CatarinaMainW(AbstractCanvasJackClass):
QMessageBox.about(self, self.tr("About Catarina"), self.tr("Catarina
"
"
Version %s"
"
Catarina is a testing ground for the 'PatchCanvas' module.
"
- "
Copyright (C) 2010-2018 falkTX") % VERSION)
+ "
Copyright (C) 2010-2022 falkTX") % VERSION)
def saveSettings(self):
settings = QSettings()
diff --git a/src/catia.py b/src/catia.py
index 819bb8d..400f9f3 100755
--- a/src/catia.py
+++ b/src/catia.py
@@ -1318,7 +1318,7 @@ class CatiaMainW(AbstractCanvasJackClass):
QMessageBox.about(self, self.tr("About Catia"), self.tr("Catia
"
"
Version %s"
"
Catia is a nice JACK Patchbay with A2J Bridge integration.
"
- "
Copyright (C) 2010-2018 falkTX" % VERSION))
+ "
Copyright (C) 2010-2022 falkTX" % VERSION))
def saveSettings(self):
settings = QSettings()
diff --git a/src/claudia.py b/src/claudia.py
index 4f4dbc7..ca4e763 100755
--- a/src/claudia.py
+++ b/src/claudia.py
@@ -2160,13 +2160,13 @@ class ClaudiaMainW(AbstractCanvasJackClass):
@pyqtSlot()
def slot_miniCanvasInit(self):
settings = QSettings()
- self.ui.graphicsView.horizontalScrollBar().setValue(settings.value("HorizontalScrollBarValue", DEFAULT_CANVAS_WIDTH / 3, type=int))
- self.ui.graphicsView.verticalScrollBar().setValue(settings.value("VerticalScrollBarValue", DEFAULT_CANVAS_HEIGHT * 3 / 8, type=int))
+ self.ui.graphicsView.horizontalScrollBar().setValue(settings.value("HorizontalScrollBarValue", int(DEFAULT_CANVAS_WIDTH / 3), type=int))
+ self.ui.graphicsView.verticalScrollBar().setValue(settings.value("VerticalScrollBarValue", int(DEFAULT_CANVAS_HEIGHT * 3 / 8), type=int))
@pyqtSlot(float, float)
def slot_miniCanvasMoved(self, xp, yp):
- self.ui.graphicsView.horizontalScrollBar().setValue(xp * DEFAULT_CANVAS_WIDTH)
- self.ui.graphicsView.verticalScrollBar().setValue(yp * DEFAULT_CANVAS_HEIGHT)
+ self.ui.graphicsView.horizontalScrollBar().setValue(int(xp * DEFAULT_CANVAS_WIDTH))
+ self.ui.graphicsView.verticalScrollBar().setValue(int(yp * DEFAULT_CANVAS_HEIGHT))
@pyqtSlot()
def slot_miniCanvasCheckAll(self):
@@ -2176,7 +2176,8 @@ class ClaudiaMainW(AbstractCanvasJackClass):
@pyqtSlot()
def slot_miniCanvasCheckSize(self):
- self.ui.miniCanvasPreview.setViewSize(float(self.ui.graphicsView.width()) / DEFAULT_CANVAS_WIDTH, float(self.ui.graphicsView.height()) / DEFAULT_CANVAS_HEIGHT)
+ self.ui.miniCanvasPreview.setViewSize(float(self.ui.graphicsView.width()) / DEFAULT_CANVAS_WIDTH,
+ float(self.ui.graphicsView.height()) / DEFAULT_CANVAS_HEIGHT)
@pyqtSlot()
def slot_handleCrash_jack(self):
@@ -2655,7 +2656,7 @@ class ClaudiaMainW(AbstractCanvasJackClass):
QMessageBox.about(self, self.tr("About Claudia"), self.tr("Claudia
"
"
Version %s"
"
Claudia is a Graphical User Interface to LADISH.
"
- "
Copyright (C) 2010-2018 falkTX" % VERSION))
+ "
Copyright (C) 2010-2022 falkTX" % VERSION))
def saveSettings(self):
settings = QSettings()
diff --git a/src/jacksettings.py b/src/jacksettings.py
index d4f236c..95d4b7a 100755
--- a/src/jacksettings.py
+++ b/src/jacksettings.py
@@ -406,7 +406,7 @@ class JackSettingsW(QDialog):
elif attribute == "client-timeout":
self.setComboBoxValue(self.ui.obj_server_client_timeout, str(int(value)))
elif attribute == "clock-source":
- if len(str(value)) == 1 :
+ if len(str(value)) == 1 and not isinstance(value, dbus.UInt32):
value = str(value)
if value == "c":
self.ui.obj_server_clock_source_cycle.setChecked(True)
diff --git a/src/patchcanvas.py b/src/patchcanvas.py
index eb05377..d3f308e 100644
--- a/src/patchcanvas.py
+++ b/src/patchcanvas.py
@@ -2480,16 +2480,16 @@ class CanvasBox(QGraphicsItem):
else:
painter.setBrush(canvas.theme.box_bg_1)
- painter.drawRect(0, 0, self.p_width, self.p_height)
+ painter.drawRect(QRectF(0, 0, self.p_width, self.p_height))
# Draw pixmap header
if canvas.theme.box_header_pixmap:
painter.setPen(Qt.NoPen)
painter.setBrush(canvas.theme.box_bg_2)
- painter.drawRect(1, 1, self.p_width-2, canvas.theme.box_header_height)
+ painter.drawRect(QRectF(1, 1, self.p_width-2, canvas.theme.box_header_height))
headerPos = QPointF(1, 1)
- headerRect = QRectF(2, 2, self.p_width-4, canvas.theme.box_header_height-3)
+ headerRect = QRectF(2, 2, int(self.p_width-4), canvas.theme.box_header_height-3)
painter.drawTiledPixmap(headerRect, canvas.theme.box_header_pixmap, headerPos)
# Draw text
diff --git a/src/render.py b/src/render.py
index ff1af79..95ace7e 100755
--- a/src/render.py
+++ b/src/render.py
@@ -349,7 +349,7 @@ class RenderW(QDialog):
@pyqtSlot()
def slot_updateProgressbar(self):
- time = int(jacklib.get_current_transport_frame(self.fJackClient)) / self.fSampleRate
+ time = int(int(jacklib.get_current_transport_frame(self.fJackClient)) / self.fSampleRate)
self.ui.progressBar.setValue(time)
if time > self.fMaxTime or (self.fLastTime > time and not self.fFreewheel):
diff --git a/src/shared.py b/src/shared.py
index d1276cd..2df4d54 100644
--- a/src/shared.py
+++ b/src/shared.py
@@ -85,7 +85,7 @@ sys.excepthook = sys_excepthook
# ------------------------------------------------------------------------------------------------------------
# Set Version
-VERSION = "0.9.0"
+VERSION = "0.9.2"
# ------------------------------------------------------------------------------------------------------------
# Set Debug mode
diff --git a/src/shared_canvasjack.py b/src/shared_canvasjack.py
index c465aab..07d2623 100644
--- a/src/shared_canvasjack.py
+++ b/src/shared_canvasjack.py
@@ -515,7 +515,7 @@ class AbstractCanvasJackClass(QMainWindow):
imgFormat = "PNG"
newPath += ".png"
- self.fExportImage = QImage(self.scene.sceneRect().width(), self.scene.sceneRect().height(), QImage.Format_RGB32)
+ self.fExportImage = QImage(int(self.scene.sceneRect().width()), int(self.scene.sceneRect().height()), QImage.Format_RGB32)
painter = QPainter(self.fExportImage)
painter.save()
painter.setRenderHint(QPainter.Antialiasing, True)