parent
0034caf4dd
commit
944cab0bd9
@ -1,50 +0,0 @@
|
||||
From 9d4f2266ee06acc69f312cf2d67047ff74d60b95 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Philippsen <nils@tiptoe.de>
|
||||
Date: Thu, 7 Apr 2022 17:09:57 +0200
|
||||
Subject: [PATCH] Cast more values to int to avoid crashes
|
||||
|
||||
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
|
||||
---
|
||||
.../support/mixer-qt4/ffado/widgets/matrixmixer.py | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py b/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py
|
||||
index f63f6fc7..6da8bf40 100644
|
||||
--- a/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py
|
||||
+++ b/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py
|
||||
@@ -210,7 +210,9 @@ class MixerNode(QAbstractSlider):
|
||||
newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos()
|
||||
change = newpos.y() - self.pos.y()
|
||||
#log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change)))
|
||||
- self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
|
||||
+ self.setValue(
|
||||
+ int(self.tmpvalue - math.copysign(pow(abs(change), 2), change))
|
||||
+ )
|
||||
ev.accept()
|
||||
|
||||
def mouseReleaseEvent(self, ev):
|
||||
@@ -218,7 +220,9 @@ class MixerNode(QAbstractSlider):
|
||||
newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos()
|
||||
change = newpos.y() - self.pos.y()
|
||||
#log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change)))
|
||||
- self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
|
||||
+ self.setValue(
|
||||
+ int(self.tmpvalue - math.copysign(pow(abs(change), 2), change))
|
||||
+ )
|
||||
self.pos = QtCore.QPointF(0, 0)
|
||||
del self.tmpvalue
|
||||
ev.accept()
|
||||
@@ -229,7 +233,9 @@ class MixerNode(QAbstractSlider):
|
||||
if (ev.modifiers() & Qt.ControlModifier):
|
||||
tmpvalue = self.value()
|
||||
change = ev.delta()/8
|
||||
- self.setValue( tmpvalue + math.copysign(pow(abs(change), 2), change) )
|
||||
+ self.setValue(
|
||||
+ int(self.tmpvalue - math.copysign(pow(abs(change), 2), change))
|
||||
+ )
|
||||
ev.accept()
|
||||
else:
|
||||
ev.ignore()
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1 +1 @@
|
||||
SHA512 (libffado-2.4.5.tgz) = a2c1d0515e14015b7803c4d52d67605afec27ae2569888dec085375ed4a488f4885b5033369e52305e668a35289d3bd749a9babb5778df339fa93553c23af30f
|
||||
SHA512 (libffado-2.4.6.tgz) = dac651233ea94c19834e810c64230bcbd5516de9e694ced1b6497ad927d734c527b3a556281676393674d33da768cb2431e7da1a0fdfc6ceb268e897029aa584
|
||||
|
Loading…
Reference in new issue