Fixed pares duplication - corrected previews generation.

preferencesAboutTextFull
Aleksei Kanash 12 years ago
parent e225cfea56
commit b574c5b1c0
  1. 3
      src/board/UBBoardController.cpp
  2. 2
      src/document/UBDocumentContainer.cpp
  3. 8
      src/document/UBDocumentContainer.h
  4. 2
      src/document/UBDocumentController.cpp

@ -526,7 +526,8 @@ void UBBoardController::duplicateScene(int nIndex)
QList<int> scIndexes;
scIndexes << nIndex;
duplicatePages(scIndexes);
insertThumbPage(nIndex);
emit documentThumbnailsUpdated(this);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
setActiveDocumentScene(nIndex + 1);

@ -46,10 +46,8 @@ void UBDocumentContainer::duplicatePages(QList<int>& pageIndexes)
foreach(int sceneIndex, pageIndexes)
{
UBPersistenceManager::persistenceManager()->duplicateDocumentScene(mCurrentDocument, sceneIndex + offset);
insertThumbPage(sceneIndex + offset);
offset++;
}
emit documentThumbnailsUpdated(this);
}
bool UBDocumentContainer::movePageToIndex(int source, int target)

@ -44,16 +44,14 @@ class UBDocumentContainer : public QObject
void addEmptyThumbPage();
private:
void deleteThumbPage(int index);
void updateThumbPage(int index);
void insertThumbPage(int index);
UBDocumentProxy* mCurrentDocument;
QList<const QPixmap*> mDocumentThumbs;
protected:
void deleteThumbPage(int index);
void updateThumbPage(int index);
void insertThumbPage(int index);
void reloadThumbnails();
signals:

@ -501,7 +501,7 @@ void UBDocumentController::duplicateSelectedItem()
if (selectedSceneIndexes.count() > 0)
{
duplicatePages(selectedSceneIndexes);
emit documentThumbnailsUpdated(this);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBMetadataDcSubsetAdaptor::persist(selectedDocument());
mDocumentUI->thumbnailWidget->selectItemAt(selectedSceneIndexes.last() + selectedSceneIndexes.size());

Loading…
Cancel
Save