fixed some errors on duplications of scene

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent a1a4052294
commit 8eebc6320f
  1. 15
      src/document/UBDocumentController.cpp
  2. 2
      src/document/UBDocumentController.h
  3. 5
      src/gui/UBThumbnailWidget.cpp

@ -534,21 +534,6 @@ void UBDocumentController::openSelectedItem()
QApplication::restoreOverrideCursor();
}
void UBDocumentController::duplicateScenes(UBDocumentProxy* proxy, QList<int> scenesIndex)
{
if(scenesIndex.count()){
int offset = 0;
foreach (int eachSceneIndex, scenesIndex){
UBPersistenceManager::persistenceManager()->duplicateDocumentScene(proxy, eachSceneIndex + offset);
mDocumentThumbs.insert(eachSceneIndex + offset, mDocumentThumbs.at(eachSceneIndex + offset));
UBApplication::boardController->setActiveDocumentScene(proxy,eachSceneIndex+offset+1);
offset++;
}
}
}
void UBDocumentController::duplicateSelectedItem()
{
if (UBApplication::applicationController->displayMode() != UBApplicationController::Document)

@ -50,8 +50,6 @@ class UBDocumentController : public QObject
UBDocumentProxy* getCurrentDocument() { return mCurrentDocument; };
void deletePages(QList<QGraphicsItem*> itemsToDelete);
int getSelectedItemIndex();
void duplicateScenes(UBDocumentProxy* proxy, QList<int> scenesIndex);
signals:
void refreshThumbnails();

@ -870,10 +870,7 @@ void UBSceneThumbnailNavigPixmap::deletePage()
void UBSceneThumbnailNavigPixmap::duplicatePage()
{
QList<int> itemsToDelete;
itemsToDelete << sceneIndex();
UBApplication::documentController->duplicateScenes(proxy(),itemsToDelete);
UBApplication::boardController->duplicateScene();
}
void UBSceneThumbnailNavigPixmap::moveUpPage()

Loading…
Cancel
Save