Skip to content
Snippets Groups Projects
Commit 8c6a1896 authored by Milian Wolff's avatar Milian Wolff
Browse files

Only update the palette once for the change event belonging to qApp.

This fixes the massive freeze that occurs when the global color
palette is changed. Note that the qApp event filter includes change
events to many objects, but we only want to update once.

BUG: 358526
parent 9ad944a8
No related branches found
No related tags found
No related merge requests found
......@@ -481,9 +481,8 @@ void KTextEditor::EditorPrivate::copyToClipboard(const QString &text)
bool KTextEditor::EditorPrivate::eventFilter(QObject *obj, QEvent *event)
{
Q_UNUSED(obj);
if (event->type() == QEvent::ApplicationPaletteChange) {
if (obj == qApp && event->type() == QEvent::ApplicationPaletteChange) {
// only update the color once for the event that belongs to the qApp
updateColorPalette();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment