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
bea07404
Commit
bea07404
authored
Feb 25, 2014
by
-f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one scene document error when asking isEmpty. Load scene was called before persisted on disk
parent
ccf7532a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+5
-3
No files found.
src/core/UBPersistenceManager.cpp
View file @
bea07404
...
...
@@ -730,6 +730,8 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
QDir
dir
(
pDocumentProxy
->
persistencePath
());
dir
.
mkpath
(
pDocumentProxy
->
persistencePath
());
mSceneCache
.
insert
(
pDocumentProxy
,
pSceneIndex
,
pScene
);
if
(
pDocumentProxy
->
isModified
())
UBMetadataDcSubsetAdaptor
::
persist
(
pDocumentProxy
);
...
...
@@ -740,7 +742,6 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
pScene
->
setModified
(
false
);
}
mSceneCache
.
insert
(
pDocumentProxy
,
pSceneIndex
,
pScene
);
}
...
...
@@ -890,14 +891,15 @@ bool UBPersistenceManager::isEmpty(UBDocumentProxy* pDocumentProxy)
if
(
pDocumentProxy
->
pageCount
()
>
1
)
return
false
;
UBGraphicsScene
*
theSoleScene
=
UBSvgSubsetAdaptor
::
loadScene
(
pDocumentProxy
,
0
);
UBGraphicsScene
*
theSoleScene
=
mSceneCache
.
value
(
pDocumentProxy
,
0
)
?
mSceneCache
.
value
(
pDocumentProxy
,
0
)
:
UBSvgSubsetAdaptor
::
loadScene
(
pDocumentProxy
,
0
);
bool
empty
=
false
;
if
(
theSoleScene
)
{
empty
=
theSoleScene
->
isEmpty
();
delete
theSoleScene
;
if
(
empty
)
delete
theSoleScene
;
}
else
{
...
...
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