Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Krita
Commits
ed757644
Commit
ed757644
authored
Sep 16, 2022
by
Dmitry Kazakov
Browse files
Fix an assert when copy/paste a filter layer
CCBUG:458115
(cherry picked from commit
8a1e5920
)
parent
5df0cc57
Pipeline
#232994
canceled with stage
in 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
libs/image/kis_selection_based_layer.cpp
View file @
ed757644
...
...
@@ -109,6 +109,8 @@ void KisSelectionBasedLayer::setImage(KisImageWSP image)
if
(
image
)
{
m_d
->
imageConnections
.
addConnection
(
image
.
data
(),
SIGNAL
(
sigSizeChanged
(
QPointF
,
QPointF
)),
this
,
SLOT
(
slotImageSizeChanged
()));
}
resetCache
();
}
bool
KisSelectionBasedLayer
::
allowAsChild
(
KisNodeSP
node
)
const
...
...
@@ -235,13 +237,16 @@ void KisSelectionBasedLayer::setInternalSelection(KisSelectionSP selection)
}
KisImageSP
imageSP
=
image
().
toStrongRef
();
KIS_SAFE_ASSERT_RECOVER_RETURN
(
imageSP
);
if
(
m_d
->
selection
->
pixelSelection
()
->
defaultBounds
()
->
bounds
()
!=
imageSP
->
bounds
())
{
qWarning
()
<<
"WARNING: KisSelectionBasedLayer::setInternalSelection"
<<
"New selection has suspicious default bounds"
;
qWarning
()
<<
"WARNING:"
<<
ppVar
(
m_d
->
selection
->
pixelSelection
()
->
defaultBounds
()
->
bounds
());
qWarning
()
<<
"WARNING:"
<<
ppVar
(
imageSP
->
bounds
());
if
(
imageSP
)
{
/**
* Sanity check for the case when the image is present
*/
if
(
m_d
->
selection
->
pixelSelection
()
->
defaultBounds
()
->
bounds
()
!=
imageSP
->
bounds
())
{
qWarning
()
<<
"WARNING: KisSelectionBasedLayer::setInternalSelection"
<<
"New selection has suspicious default bounds"
;
qWarning
()
<<
"WARNING:"
<<
ppVar
(
m_d
->
selection
->
pixelSelection
()
->
defaultBounds
()
->
bounds
());
qWarning
()
<<
"WARNING:"
<<
ppVar
(
imageSP
->
bounds
());
}
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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