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
82bbef18
Commit
82bbef18
authored
Jun 27, 2012
by
Halla Rempt
Browse files
Don't notify the undo adaptor if there is no shape selection
BUG: 134821
parent
c230df3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
krita/ui/flake/kis_shape_selection_model.cpp
View file @
82bbef18
...
...
@@ -29,9 +29,9 @@
#include "kis_undo_adapter.h"
KisShapeSelectionModel
::
KisShapeSelectionModel
(
KisImageWSP
image
,
KisSelectionWSP
selection
,
KisShapeSelection
*
shapeSelection
)
:
m_image
(
image
)
,
m_parentSelection
(
selection
)
,
m_shapeSelection
(
shapeSelection
)
:
m_image
(
image
)
,
m_parentSelection
(
selection
)
,
m_shapeSelection
(
shapeSelection
)
{
}
...
...
@@ -43,6 +43,8 @@ KisShapeSelectionModel::~KisShapeSelectionModel()
void
KisShapeSelectionModel
::
add
(
KoShape
*
child
)
{
if
(
!
m_shapeSelection
)
return
;
if
(
m_shapeMap
.
contains
(
child
))
return
;
...
...
@@ -71,6 +73,8 @@ void KisShapeSelectionModel::add(KoShape *child)
void
KisShapeSelectionModel
::
remove
(
KoShape
*
child
)
{
if
(
!
m_shapeMap
.
contains
(
child
))
return
;
QRect
updateRect
=
child
->
boundingRect
().
toAlignedRect
();
m_shapeMap
.
remove
(
child
);
...
...
@@ -84,9 +88,9 @@ void KisShapeSelectionModel::remove(KoShape *child)
updateRect
=
matrix
.
mapRect
(
updateRect
);
if
(
m_shapeSelection
)
{
// No m_shapeSelection indicates the selection is being deleted
m_parentSelection
->
updateProjection
(
updateRect
);
m_image
->
undoAdapter
()
->
emitSelectionChanged
();
}
m_image
->
undoAdapter
()
->
emitSelectionChanged
();
}
void
KisShapeSelectionModel
::
setClipped
(
const
KoShape
*
child
,
bool
clipping
)
...
...
@@ -128,8 +132,8 @@ void KisShapeSelectionModel::containerChanged(KoShapeContainer *, KoShape::Chang
void
KisShapeSelectionModel
::
childChanged
(
KoShape
*
child
,
KoShape
::
ChangeType
type
)
{
if
(
type
==
KoShape
::
ParentChanged
)
return
;
if
(
!
m_shapeSelection
)
return
;
if
(
type
==
KoShape
::
ParentChanged
)
return
;
m_shapeSelection
->
setDirty
();
QRectF
changedRect
=
m_shapeMap
[
child
];
...
...
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