Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
52a4aeab
Commit
52a4aeab
authored
Feb 21, 2021
by
Julius Künzel
Browse files
Fix color picker corruption
Fixes
#800
(cherry picked from commit
1fc507cb
)
parent
9b015768
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/colorpickerwidget.cpp
View file @
52a4aeab
...
...
@@ -143,6 +143,8 @@ void ColorPickerWidget::slotGetAverageColor()
#ifdef Q_WS_X11
XDestroyImage
(
m_image
);
m_image
=
nullptr
;
#else
m_image
=
QImage
();
#endif
emit
colorPicked
(
QColor
(
sumR
/
numPixel
,
sumG
/
numPixel
,
sumB
/
numPixel
));
...
...
@@ -175,8 +177,7 @@ void ColorPickerWidget::mouseReleaseEvent(QMouseEvent *event)
m_grabRect
=
m_grabRect
.
normalized
();
if
(
m_grabRect
.
width
()
*
m_grabRect
.
height
()
==
0
)
{
m_grabRectFrame
->
hide
();
emit
colorPicked
(
grabColor
(
event
->
globalPos
()));
emit
colorPicked
(
m_mouseColor
);
emit
disableCurrentFilter
(
false
);
}
else
{
// delay because m_grabRectFrame does not hide immediately
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment