[graphics/krita] libs/ui/widgets: Show "No Preview" for presets that don't support it
Dmitry Kazakov
null at kde.org
Fri Jun 4 06:05:46 BST 2021
Git commit aaf42e1328e5b4b871628da44d5831f25ee16d9b by Dmitry Kazakov, on behalf of Srirupa Datta.
Committed on 04/06/2021 at 05:05.
Pushed by dkazakov into branch 'master'.
Show "No Preview" for presets that don't support it
GUI:
BUG: 412323
FIXED IN: 5.0.0
M +7 -4 libs/ui/widgets/kis_preset_live_preview_view.cpp
https://invent.kde.org/graphics/krita/commit/aaf42e1328e5b4b871628da44d5831f25ee16d9b
diff --git a/libs/ui/widgets/kis_preset_live_preview_view.cpp b/libs/ui/widgets/kis_preset_live_preview_view.cpp
index 24587c51fd..e57d09c252 100644
--- a/libs/ui/widgets/kis_preset_live_preview_view.cpp
+++ b/libs/ui/widgets/kis_preset_live_preview_view.cpp
@@ -159,10 +159,13 @@ void KisPresetLivePreviewView::paintBackground()
// experimentbrush -- this creates artifacts that carry over to other previews and messes up their display
// duplicate (clone) brush doesn't have a preview as it doesn't show anything)
- if(m_sceneImageItem) {
- this->scene()->removeItem(m_sceneImageItem);
- m_sceneImageItem = 0;
- }
+ // fill with gray first to clear out what existed from previous preview
+ KisTransaction t(m_layer->paintDevice());
+ m_layer->paintDevice()->fill(m_image->bounds(), KoColor(palette().color(QPalette::Background) , m_colorSpace));
+ t.end();
+
+ m_paintColor = KoColor(palette().color(QPalette::Text), m_colorSpace);
+
QFont font;
font.setPixelSize(14);
font.setBold(false);
More information about the kde-doc-english
mailing list