Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
e78752f3
Commit
e78752f3
authored
Feb 10, 2012
by
Dmitry Kazakov
Browse files
Fix crash when transform local selections
BUG:261033
parent
7448b532
Changes
3
Hide whitespace changes
Inline
Side-by-side
krita/image/kis_mask.cc
View file @
e78752f3
...
...
@@ -155,9 +155,9 @@ KisSelectionSP KisMask::selection() const
else
{
m_d
->
selection
=
new
KisSelection
();
}
m_d
->
selection
->
setParentNode
(
const_cast
<
KisMask
*>
(
this
));
m_d
->
selection
->
updateProjection
();
}
m_d
->
selection
->
setParentNode
(
const_cast
<
KisMask
*>
(
this
));
return
m_d
->
selection
;
}
...
...
krita/image/kis_selected_transaction_data.cpp
View file @
e78752f3
...
...
@@ -29,14 +29,21 @@ KisSelectedTransactionData::KisSelectedTransactionData(const QString& name, KisN
,
m_selTransaction
(
0
)
,
m_hadSelection
(
false
)
{
m_layer
=
dynamic_cast
<
KisLayer
*>
(
node
.
data
())
;
while
(
!
m_layer
&&
node
->
parent
())
{
m_layer
=
dynamic_cast
<
KisLayer
*>
(
node
->
parent
().
data
());
node
=
node
->
parent
(
);
}
KisNodeSP
currentNode
=
node
;
do
{
m_layer
=
dynamic_cast
<
KisLayer
*>
(
currentNode
.
data
()
);
}
while
(
!
m_layer
&&
(
currentNode
=
currentNode
->
parent
()));
if
(
m_layer
->
selection
())
m_selTransaction
=
new
KisTransactionData
(
name
,
KisPaintDeviceSP
(
m_layer
->
selection
()
->
getOrCreatePixelSelection
().
data
()));
KisSelectionSP
selection
=
m_layer
->
selection
();
if
(
selection
)
{
KisPaintDeviceSP
selectionPaintDevice
=
selection
->
getOrCreatePixelSelection
();
if
(
selectionPaintDevice
!=
node
->
paintDevice
())
{
m_selTransaction
=
new
KisTransactionData
(
name
,
selectionPaintDevice
);
}
}
}
KisSelectedTransactionData
::~
KisSelectedTransactionData
()
...
...
krita/plugins/tools/tool_transform2/kis_tool_transform.cc
View file @
e78752f3
...
...
@@ -2141,7 +2141,7 @@ void KisToolTransform::applyTransform()
// Perform the transform. Since we copied the original state back, this doesn't degrade
// after many tweaks. Since we started the transaction before the copy back, the memento
// has the previous state.
if
(
m_origSelection
)
{
if
(
!
currentNode
()
->
inherits
(
"KisMask"
)
&&
m_origSelection
)
{
KoUpdaterPtr
copyPixels
=
updater
->
startSubtask
(
5
);
KoUpdaterPtr
transformPixels
=
updater
->
startSubtask
(
10
);
KoUpdaterPtr
copyBackPixels
=
updater
->
startSubtask
(
5
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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