Commit 5c326ec1 authored by Mathias Wein's avatar Mathias Wein

Don't return between QPainter save and restore

From Qt docs:
"A save() must be followed by a corresponding restore();"

So just move the conditional return up by one statement to avoid
incorrect stack unwinding in KisPaletteDelegate.
parent 5d9725e3
......@@ -69,11 +69,10 @@ void KisPaletteDelegate::paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
if (!index.isValid())
const bool isSelected = option.state & QStyle::State_Selected;
if (qvariant_cast<bool>( {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment