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
8a1e5920
Commit
8a1e5920
authored
Sep 16, 2022
by
Dmitry Kazakov
Browse files
Fix an assert when copy/paste a filter layer
CCBUG:458115
parent
4b53f48d
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs/image/kis_selection_based_layer.cpp
View file @
8a1e5920
...
...
@@ -110,6 +110,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
...
...
@@ -237,13 +239,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
{
...
...
Dmitry Kazakov
@dkazakov
mentioned in commit
ed757644
·
Sep 16, 2022
mentioned in commit
ed757644
mentioned in commit ed757644f27d4f1507b5e8c294b48529545a85cf
Toggle commit list
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