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
363d37ec
Commit
363d37ec
authored
Jul 27, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
a3f2b08b
f5ee83a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
UBDrawingController.h
src/board/UBDrawingController.h
+4
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+7
-7
No files found.
src/board/UBDrawingController.h
View file @
363d37ec
...
...
@@ -65,6 +65,10 @@ class UBDrawingController : public QObject
mIsDesktopMode
=
mode
;
}
bool
isInDesktopMode
(){
return
mIsDesktopMode
;
}
public
slots
:
void
setStylusTool
(
int
tool
);
...
...
src/domain/UBGraphicsScene.cpp
View file @
363d37ec
...
...
@@ -779,7 +779,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
if
(
mShouldUseOMP
)
{
//
#pragma omp parallel for
#pragma omp parallel for
for
(
int
i
=
0
;
i
<
collidItemsSize
;
i
++
)
{
UBGraphicsPolygonItem
*
collidingPolygonItem
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
collidItems
.
at
(
i
));
...
...
@@ -789,7 +789,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
if
(
eraserInnerRect
.
contains
(
collidingPolygonItem
->
boundingRect
()))
{
//
#pragma omp critical
#pragma omp critical
// Put the entire polygon into the remove list
toBeRemovedItems
<<
collidingPolygonItem
;
}
...
...
@@ -826,7 +826,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
}
else */
if
(
croppedPathSimplified
.
isEmpty
())
{
//
#pragma omp critical
#pragma omp critical
// Put the entire polygon into the remove list if the eraser removes all its visible content
toBeRemovedItems
<<
collidingPolygonItem
;
}
...
...
@@ -837,7 +837,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
foreach
(
const
QPolygonF
&
pol
,
croppedPathSimplified
.
toFillPolygons
())
{
UBGraphicsPolygonItem
*
croppedPolygonItem
=
collidingPolygonItem
->
deepCopy
(
pol
);
//
#pragma omp critical
#pragma omp critical
if
(
NULL
!=
pGroup
){
croppedPolygonItem
->
setStrokesGroup
(
pGroup
);
//pGroup->addToGroup(croppedPolygonItem);
...
...
@@ -845,7 +845,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
// Add this new polygon to the 'added' list
toBeAddedItems
<<
croppedPolygonItem
;
}
//
#pragma omp critical
#pragma omp critical
// Remove the original polygonitem because it has been replaced by many smaller polygons
toBeRemovedItems
<<
collidingPolygonItem
;
}
...
...
@@ -902,7 +902,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
}
}
if
(
eDrawingMode_Vector
==
UBDrawingController
::
drawingController
()
->
drawing
Mode
()){
if
(
eDrawingMode_Vector
==
DRAWING_MODE
&&
!
UBDrawingController
::
drawingController
()
->
isInDesktop
Mode
()){
foreach
(
QGraphicsItem
*
item
,
toBeRemovedItems
){
UBGraphicsPolygonItem
*
poly
=
dynamic_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
NULL
!=
poly
){
...
...
@@ -920,7 +920,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
mRemovedItems
+=
toBeRemovedItems
;
}
if
(
eDrawingMode_Vector
==
UBDrawingController
::
drawingController
()
->
drawing
Mode
()){
if
(
eDrawingMode_Vector
==
DRAWING_MODE
&&
!
UBDrawingController
::
drawingController
()
->
isInDesktop
Mode
()){
foreach
(
QGraphicsItem
*
item
,
toBeAddedItems
){
UBGraphicsPolygonItem
*
poly
=
dynamic_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
NULL
!=
poly
&&
NULL
!=
poly
->
strokesGroup
()){
...
...
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