Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
3a21e072
Commit
3a21e072
authored
Sep 03, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SANKORE-1063
The annotations are erased when you select the Erase items
parent
0d1e848f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+6
-15
No files found.
src/domain/UBGraphicsScene.cpp
View file @
3a21e072
...
...
@@ -1078,12 +1078,9 @@ void UBGraphicsScene::clearItemsAndAnnotations()
QSet
<
QGraphicsItem
*>
emptyList
;
QSet
<
QGraphicsItem
*>
removedItems
;
QListIterator
<
QGraphicsItem
*>
itItems
(
mFastAccessItems
);
while
(
itItems
.
hasNext
())
QList
<
QGraphicsItem
*>
sceneItems
=
items
();
foreach
(
QGraphicsItem
*
item
,
sceneItems
)
{
QGraphicsItem
*
item
=
itItems
.
next
();
if
(
!
mTools
.
contains
(
item
)
&&
!
isBackgroundObject
(
item
))
{
removeItem
(
item
);
...
...
@@ -1109,12 +1106,9 @@ void UBGraphicsScene::clearItems()
QSet
<
QGraphicsItem
*>
emptyList
;
QSet
<
QGraphicsItem
*>
removedItems
;
QListIterator
<
QGraphicsItem
*>
itItems
(
mFastAccessItems
);
while
(
itItems
.
hasNext
())
QList
<
QGraphicsItem
*>
sceneItems
=
items
();
foreach
(
QGraphicsItem
*
item
,
sceneItems
)
{
QGraphicsItem
*
item
=
itItems
.
next
();
bool
isGroup
=
qgraphicsitem_cast
<
UBGraphicsGroupContainerItem
*>
(
item
)
!=
NULL
;
bool
isPolygon
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
)
!=
NULL
;
bool
isStrokesGroup
=
qgraphicsitem_cast
<
UBGraphicsStrokesGroup
*>
(
item
)
!=
NULL
;
...
...
@@ -1143,11 +1137,9 @@ void UBGraphicsScene::clearAnnotations()
QSet
<
QGraphicsItem
*>
emptyList
;
QSet
<
QGraphicsItem
*>
removedItems
;
QListIterator
<
QGraphicsItem
*>
itItems
(
mFastAccessItems
);
while
(
itItems
.
hasNext
())
QList
<
QGraphicsItem
*>
sceneItems
=
items
();
foreach
(
QGraphicsItem
*
item
,
sceneItems
)
{
QGraphicsItem
*
item
=
itItems
.
next
();
UBGraphicsStrokesGroup
*
pi
=
qgraphicsitem_cast
<
UBGraphicsStrokesGroup
*>
(
item
);
if
(
pi
)
{
...
...
@@ -1159,7 +1151,6 @@ void UBGraphicsScene::clearAnnotations()
// force refresh, QT is a bit lazy and take a lot of time (nb item ^2 ?) to trigger repaint
update
(
sceneRect
());
if
(
enableUndoRedoStack
)
{
//should be deleted after scene own undo stack implemented
UBGraphicsItemUndoCommand
*
uc
=
new
UBGraphicsItemUndoCommand
(
this
,
removedItems
,
emptyList
);
UBApplication
::
undoStack
->
push
(
uc
);
...
...
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