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
019895ed
Commit
019895ed
authored
Dec 09, 2015
by
Craig Watson
Browse files
Options
Browse Files
Download
Plain Diff
Fix issue #12 (zOrder not saved to .svg)
(Merge branch 'craig-dev' into dev)
parents
5a1468a7
64002a17
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
19 additions
and
20 deletions
+19
-20
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+2
-15
UBBoardView.cpp
src/board/UBBoardView.cpp
+0
-1
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+2
-0
UBGraphicsPDFItem.cpp
src/domain/UBGraphicsPDFItem.cpp
+1
-0
UBGraphicsPixmapItem.cpp
src/domain/UBGraphicsPixmapItem.cpp
+2
-0
UBGraphicsPolygonItem.cpp
src/domain/UBGraphicsPolygonItem.cpp
+1
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+4
-0
UBGraphicsStrokesGroup.cpp
src/domain/UBGraphicsStrokesGroup.cpp
+1
-0
UBGraphicsSvgItem.cpp
src/domain/UBGraphicsSvgItem.cpp
+1
-0
UBGraphicsTextItem.cpp
src/domain/UBGraphicsTextItem.cpp
+1
-0
UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.cpp
+3
-0
UBSelectionFrame.cpp
src/domain/UBSelectionFrame.cpp
+0
-4
UBGraphicsCurtainItem.cpp
src/tools/UBGraphicsCurtainItem.cpp
+1
-0
No files found.
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
019895ed
...
...
@@ -1077,20 +1077,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
{
QGraphicsItem
*
item
=
items
.
takeFirst
();
// Is the item a strokes group?
UBGraphicsStrokesGroup
*
strokesGroupItem
=
qgraphicsitem_cast
<
UBGraphicsStrokesGroup
*>
(
item
);
if
(
strokesGroupItem
&&
strokesGroupItem
->
isVisible
()){
// Add the polygons
foreach
(
QGraphicsItem
*
item
,
strokesGroupItem
->
childItems
()){
UBGraphicsPolygonItem
*
poly
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
NULL
!=
poly
){
polygonItemToSvgPolygon
(
poly
,
true
);
items
.
removeOne
(
poly
);
}
}
}
// Is the item a polygon?
UBGraphicsPolygonItem
*
polygonItem
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
polygonItem
&&
polygonItem
->
isVisible
())
...
...
@@ -1125,7 +1111,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
if
(
colorOnDarkBackground
.
isValid
()
&&
colorOnLightBackground
.
isValid
())
{
mXmlWriter
.
writeAttribute
(
UBSettings
::
uniboardDocumentNamespaceUri
,
"z-value"
,
QString
(
"%1"
).
arg
(
polygonItem
->
zValue
()));
,
QString
(
"%1"
).
arg
(
polygonItem
->
strokesGroup
()
->
zValue
()));
mXmlWriter
.
writeAttribute
(
UBSettings
::
uniboardDocumentNamespaceUri
,
"fill-on-dark-background"
,
colorOnDarkBackground
.
name
());
...
...
@@ -2112,6 +2098,7 @@ UBGraphicsMediaItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::videoItemFromSvg()
void
UBSvgSubsetAdaptor
::
UBSvgSubsetReader
::
graphicsItemFromSvg
(
QGraphicsItem
*
gItem
)
{
// TODO: check position
QStringRef
svgTransform
=
mXmlReader
.
attributes
().
value
(
"transform"
);
QMatrix
itemMatrix
;
...
...
src/board/UBBoardView.cpp
View file @
019895ed
...
...
@@ -1083,7 +1083,6 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event)
// QTime mouseMoveTime = QTime::currentTime();
if
(
!
mIsDragInProgress
&&
((
mapToScene
(
event
->
pos
())
-
mLastPressedMousePos
).
manhattanLength
()
<
QApplication
::
startDragDistance
()))
{
qDebug
()
<<
"mouse move event canceled"
;
return
;
}
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
019895ed
...
...
@@ -275,6 +275,8 @@ void UBGraphicsMediaItem::copyItemParameters(UBItem *copy) const
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
resize
(
this
->
size
());
cp
->
setZValue
(
this
->
zValue
());
connect
(
UBApplication
::
boardController
,
SIGNAL
(
activeSceneChanged
()),
cp
,
SLOT
(
activeSceneChanged
()));
// TODO UB 4.7 complete all members
}
...
...
src/domain/UBGraphicsPDFItem.cpp
View file @
019895ed
...
...
@@ -122,6 +122,7 @@ void UBGraphicsPDFItem::copyItemParameters(UBItem *copy) const
cp
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
src/domain/UBGraphicsPixmapItem.cpp
View file @
019895ed
...
...
@@ -156,6 +156,8 @@ void UBGraphicsPixmapItem::copyItemParameters(UBItem *copy) const
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
cp
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
this
->
data
(
UBGraphicsItemData
::
ItemLocked
));
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
src/domain/UBGraphicsPolygonItem.cpp
View file @
019895ed
...
...
@@ -197,6 +197,7 @@ void UBGraphicsPolygonItem::copyItemParameters(UBItem *copy) const
cp
->
setColorOnDarkBackground
(
this
->
colorOnDarkBackground
());
cp
->
setColorOnLightBackground
(
this
->
colorOnLightBackground
());
cp
->
setZValue
(
this
->
zValue
());
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
}
}
...
...
src/domain/UBGraphicsScene.cpp
View file @
019895ed
...
...
@@ -262,6 +262,10 @@ qreal UBZLayerController::changeZLevelTo(QGraphicsItem *item, moveDestination de
}
//Return new z value assigned to item
// experimental
item
->
setZValue
(
item
->
data
(
UBGraphicsItemData
::
ItemOwnZValue
).
toReal
());
return
item
->
data
(
UBGraphicsItemData
::
ItemOwnZValue
).
toReal
();
}
...
...
src/domain/UBGraphicsStrokesGroup.cpp
View file @
019895ed
...
...
@@ -185,6 +185,7 @@ void UBGraphicsStrokesGroup::copyItemParameters(UBItem *copy) const
cp
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
cp
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
this
->
data
(
UBGraphicsItemData
::
ItemLocked
));
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
src/domain/UBGraphicsSvgItem.cpp
View file @
019895ed
...
...
@@ -180,6 +180,7 @@ void UBGraphicsSvgItem::copyItemParameters(UBItem *copy) const
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
cp
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
this
->
data
(
UBGraphicsItemData
::
ItemLocked
));
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
src/domain/UBGraphicsTextItem.cpp
View file @
019895ed
...
...
@@ -280,6 +280,7 @@ void UBGraphicsTextItem::copyItemParameters(UBItem *copy) const
cp
->
setTextHeight
(
this
->
textHeight
());
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
src/domain/UBGraphicsWidgetItem.cpp
View file @
019895ed
...
...
@@ -744,6 +744,7 @@ void UBGraphicsAppleWidgetItem::copyItemParameters(UBItem *copy) const
}
cp
->
setSourceUrl
(
this
->
sourceUrl
());
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
@@ -1228,6 +1229,8 @@ void UBGraphicsW3CWidgetItem::copyItemParameters(UBItem *copy) const
{
cp
->
setDatastoreEntry
(
key
,
mDatastore
.
value
(
key
));
}
cp
->
setZValue
(
this
->
zValue
());
}
}
src/domain/UBSelectionFrame.cpp
View file @
019895ed
...
...
@@ -243,9 +243,6 @@ void UBSelectionFrame::mouseReleaseEvent(QGraphicsSceneMouseEvent */*event*/)
void
UBSelectionFrame
::
onZoomChanged
(
qreal
pZoom
)
{
qDebug
()
<<
"Pzoom"
<<
pZoom
;
qDebug
()
<<
"Board current zoom"
<<
UBApplication
::
boardController
->
currentZoom
();
qDebug
()
<<
"UBApplication::boardController->systemScaleFactor()"
<<
UBApplication
::
boardController
->
systemScaleFactor
();
mAntiscaleRatio
=
1
/
(
UBApplication
::
boardController
->
systemScaleFactor
()
*
pZoom
);
}
...
...
@@ -458,7 +455,6 @@ QList<QGraphicsItem*> UBSelectionFrame::sortedByZ(const QList<QGraphicsItem *> &
QList
<
DelegateButton
*>
UBSelectionFrame
::
buttonsForFlags
(
UBGraphicsFlags
fls
)
{
qDebug
()
<<
"buttons for flags"
<<
QString
::
number
((
int
)
fls
,
2
);
QList
<
DelegateButton
*>
result
;
if
(
!
mDeleteButton
)
{
...
...
src/tools/UBGraphicsCurtainItem.cpp
View file @
019895ed
...
...
@@ -167,6 +167,7 @@ void UBGraphicsCurtainItem::copyItemParameters(UBItem *copy) const
cp
->
setFlag
(
QGraphicsItem
::
ItemIsMovable
,
true
);
cp
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
cp
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
this
->
data
(
UBGraphicsItemData
::
ItemLayerType
));
cp
->
setZValue
(
this
->
zValue
());
}
}
...
...
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