Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
518235-Out-of-Bounds-Selection-Inversion
Ricky Ringler5e83a17d045e
diff --git a/libs/image/kis_selection_filters.cpp b/libs/image/kis_selection_filters.cppindex 5939b187ed..775ca8dbcd 100644--- a/libs/image/kis_selection_filters.cpp+++ b/libs/image/kis_selection_filters.cpp@@ -895,7 +895,12 @@ void KisInvertSelectionFilter::process(KisPixelSelectionSP pixelSelection, const{Q_UNUSED(rect);- const QRect imageRect = pixelSelection->defaultBounds()->bounds();+ /**+ * The default bounds of a selection may also include the extent+ * of the parent device, which is not what we want here. Hence we+ * should request imageBorderRect() directly.+ */+ const QRect imageRect = pixelSelection->defaultBounds()->imageBorderRect();const QRect selectionRect = pixelSelection->selectedExactRect();/**