Fix: some bugs in UBDocument#1390
Open
letsfindaway wants to merge 2 commits intoOpenBoard-org:devfrom
Open
Conversation
4 tasks
- return boolean success indicator for page operations - add parameter to suppress confirmation dialog when deleting pages - create TOC assets entry when creating a page - create thumbnail when creating a page - add common function to UBDocumentToc to check index bounds Signed-off-by: letsfindaway <me@letsfindaway.de>
- do not attempt to save current page when it was deleted - set mDeletingSceneIndex while switching to other scene - remove `UBBoardController::deleteScene()` as it is no longer used - remove `UBBoardController::setActiveSceneIndex` as it is not used and would break internal consistency of the board controller Signed-off-by: letsfindaway <me@letsfindaway.de>
e75be60 to
e0211bb
Compare
Collaborator
Author
|
Ready for merging. I'm not adding more changes to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This draft PR is used to make further improvements to
UBDocumentandUBDocumentToc. It fixes some errors I found when testing and adds success/failure feedback for the page manipulation functions ofUBDocument.I start this with a Draft PR, as I might add more commits when I find more problems or improvements.
The first commit adds a
boolreturn value for page manipulation functions inUBDocument. It also adds a parameter to suppress the confirmation dialog when deleting pages. This might be useful later for the widget API. Additionally it fixes an issue that thumbnail and assets list have not been created when adding a new page.The second commit fixes a crash which could occur when deleting the current scene. The function
deleteScene()in theUBBoardControllerdid already handle this problem using the variablemDeletingSceneIndex. But this function is no longer used. I now added code to the callbackdocumentSceneDeleted()to handle this case.deleteScene()is removed, as it is no longer used.