[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1021119: openshot-qt: openshot fails to open color picker in chroma key effect filter [patch available]



Package: openshot-qt
Version: 2.6.1+dfsg1-2
Severity: important
Tags: patch upstream

When adding the chroma key effect filter in openshot and trying to change the
key color from black, by double-clicking on the color, the color picker fails
to open, rendering the whole effect useless.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-
packages/openshot_qt/windows/views/properties_tableview.py", line 346, in
doubleClickedCB
    currentColor = QColor(red, green, blue)
TypeError: arguments did not match any overloaded call:
  QColor(Qt.GlobalColor): argument 1 has unexpected type 'float'
  QColor(int): argument 1 has unexpected type 'float'
  QColor(QRgba64): argument 1 has unexpected type 'float'
  QColor(Any): too many arguments
  QColor(): too many arguments
  QColor(int, int, int, alpha: int = 255): argument 1 has unexpected type
'float'
  QColor(str): argument 1 has unexpected type 'float'
  QColor(Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected
type 'float'
INFO main_window: Prompt user to save project

Upstream has indeed patched the line in question in March 2022 in a still
unreleased version in commit:
https://github.com/OpenShot/openshot-
qt/commit/be9a9b9faa62c66678cec4da89d00cbcc28748d8

I have verified that the patch applies cleanly to the released version of
openshot and fixes the issue at hand (the color picker opens and works).

I propose to cherry pick above upstream patch into the version that is
currently in bookworm as the chroma key effect is effectively broken in
bookworm and I don't think a new release is imminent.

I will propose a MR into the Debian packaging repo that includes this patch
soon.


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openshot-qt depends on:
ii  fonts-cantarell         0.303.1-1
ii  libjs-jquery            3.6.1+dfsg+~3.5.14-1
ii  libjs-jquery-ui         1.13.2+dfsg-1
ii  python3                 3.10.6-1
ii  python3-openshot        0.2.7+dfsg1-4
ii  python3-pkg-resources   65.3.0-1.1
ii  python3-pyqt5           5.15.7+dfsg-1+b1
ii  python3-pyqt5.qtsvg     5.15.7+dfsg-1+b1
ii  python3-pyqt5.qtwebkit  5.15.7+dfsg-1+b1
ii  python3-requests        2.27.1+dfsg-1
ii  python3-zmq             22.3.0-1+b2

Versions of packages openshot-qt recommends:
pn  blender   <none>
ii  inkscape  1.2.1+ds-1+b1

Versions of packages openshot-qt suggests:
pn  openshot-qt-doc  <none>

-- no debconf information
>From be9a9b9faa62c66678cec4da89d00cbcc28748d8 Mon Sep 17 00:00:00 2001
From: Richard Newsham <richard@simperl.com>
Date: Tue, 22 Mar 2022 07:34:02 +0000
Subject: [PATCH] Properties: Ensure QColor() is passed int args

---
 src/windows/views/properties_tableview.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/windows/views/properties_tableview.py b/src/windows/views/properties_tableview.py
index fdaa7ee2..6d05b7dd 100644
--- a/src/windows/views/properties_tableview.py
+++ b/src/windows/views/properties_tableview.py
@@ -343,7 +343,7 @@ class PropertiesTableView(QTableView):
                 blue = cur_property[1]["blue"]["value"]
 
                 # Show color dialog
-                currentColor = QColor(red, green, blue)
+                currentColor = QColor(int(red), int(green), int(blue))
                 log.debug("Launching ColorPicker for %s", currentColor.name())
                 ColorPicker(
                     currentColor, parent=self, title=_("Select a Color"),
-- 
2.37.2


Reply to: