|
|
@ -481,7 +481,7 @@ void UBBoardController::stylusToolDoubleClicked(int tool) |
|
|
|
void UBBoardController::addScene() |
|
|
|
void UBBoardController::addScene() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
|
|
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
|
|
|
persistCurrentScene(); |
|
|
|
persistCurrentScene(false,true); |
|
|
|
|
|
|
|
|
|
|
|
UBDocumentContainer::addPage(mActiveSceneIndex + 1); |
|
|
|
UBDocumentContainer::addPage(mActiveSceneIndex + 1); |
|
|
|
|
|
|
|
|
|
|
@ -523,7 +523,7 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
persistCurrentScene(); |
|
|
|
persistCurrentScene(false,true); |
|
|
|
UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(selectedDocument(), clone, mActiveSceneIndex + 1); |
|
|
|
UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(selectedDocument(), clone, mActiveSceneIndex + 1); |
|
|
|
setActiveDocumentScene(mActiveSceneIndex + 1); |
|
|
|
setActiveDocumentScene(mActiveSceneIndex + 1); |
|
|
|
} |
|
|
|
} |
|
|
@ -546,7 +546,7 @@ void UBBoardController::addScene(UBDocumentProxy* proxy, int sceneIndex, bool re |
|
|
|
void UBBoardController::duplicateScene(int nIndex) |
|
|
|
void UBBoardController::duplicateScene(int nIndex) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
|
|
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
|
|
|
persistCurrentScene(); |
|
|
|
persistCurrentScene(false,true); |
|
|
|
|
|
|
|
|
|
|
|
QList<int> scIndexes; |
|
|
|
QList<int> scIndexes; |
|
|
|
scIndexes << nIndex; |
|
|
|
scIndexes << nIndex; |
|
|
@ -1538,7 +1538,7 @@ void UBBoardController::moveSceneToIndex(int source, int target) |
|
|
|
if (selectedDocument()) |
|
|
|
if (selectedDocument()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
persistCurrentScene(); |
|
|
|
persistCurrentScene(false,true); |
|
|
|
|
|
|
|
|
|
|
|
UBDocumentContainer::movePageToIndex(source, target); |
|
|
|
UBDocumentContainer::movePageToIndex(source, target); |
|
|
|
|
|
|
|
|
|
|
@ -1890,14 +1890,14 @@ void UBBoardController::show() |
|
|
|
UBApplication::mainWindow->actionLibrary->setChecked(false); |
|
|
|
UBApplication::mainWindow->actionLibrary->setChecked(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardController::persistCurrentScene(bool isAnAutomaticBackup) |
|
|
|
void UBBoardController::persistCurrentScene(bool isAnAutomaticBackup, bool forceImmediateSave) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(UBPersistenceManager::persistenceManager() |
|
|
|
if(UBPersistenceManager::persistenceManager() |
|
|
|
&& selectedDocument() && mActiveScene && mActiveSceneIndex != mDeletingSceneIndex |
|
|
|
&& selectedDocument() && mActiveScene && mActiveSceneIndex != mDeletingSceneIndex |
|
|
|
&& (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex |
|
|
|
&& (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex |
|
|
|
&& (mActiveScene->isModified())) |
|
|
|
&& (mActiveScene->isModified())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex, isAnAutomaticBackup); |
|
|
|
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex, isAnAutomaticBackup,forceImmediateSave); |
|
|
|
updatePage(mActiveSceneIndex); |
|
|
|
updatePage(mActiveSceneIndex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|