added code lost in auto-resolved conflicts during my last 'stash apply'

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent 08e718f567
commit cd1b2e0087
  1. 6
      src/board/UBBoardController.cpp
  2. 2
      src/core/UBPersistenceManager.cpp
  3. 2
      src/document/UBDocumentContainer.h
  4. 4
      src/document/UBDocumentController.cpp
  5. 6
      src/gui/UBThumbnailWidget.cpp

@ -773,7 +773,7 @@ void UBBoardController::deleteScene(int nIndex)
mDeletingSceneIndex = nIndex; mDeletingSceneIndex = nIndex;
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
persistCurrentScene(); persistCurrentScene();
showMessage(tr("Delete page %1 from document").arg(nIndex), true); showMessage(tr("Deleting page %1").arg(nIndex+1), true);
QList<int> scIndexes; QList<int> scIndexes;
scIndexes << nIndex; scIndexes << nIndex;
@ -783,7 +783,7 @@ void UBBoardController::deleteScene(int nIndex)
if (nIndex >= pageCount()) if (nIndex >= pageCount())
nIndex = pageCount()-1; nIndex = pageCount()-1;
setActiveDocumentScene(nIndex); setActiveDocumentScene(nIndex);
showMessage(tr("Page %1 deleted").arg(nIndex)); showMessage(tr("Page %1 deleted").arg(nIndex+1));
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
mDeletingSceneIndex = -1; mDeletingSceneIndex = -1;
} }
@ -1564,8 +1564,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
setDocument(pDocumentProxy, forceReload); setDocument(pDocumentProxy, forceReload);
persistCurrentScene();
updateSystemScaleFactor(); updateSystemScaleFactor();
mControlView->setScene(mActiveScene); mControlView->setScene(mActiveScene);

@ -505,6 +505,7 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL
QFile::rename(source, target); QFile::rename(source, target);
} }
UBApplication::showMessage("Moving page to trash folder...");
insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount()); insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount());
} }
} }
@ -777,7 +778,6 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
if (pDocumentProxy->isModified()) if (pDocumentProxy->isModified())
persistDocumentMetadata(pDocumentProxy, forceImmediateSaving); persistDocumentMetadata(pDocumentProxy, forceImmediateSaving);
UBApplication::showMessage(tr("Saving thumbnail of page %1").arg(pSceneIndex+1));
UBThumbnailAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex); UBThumbnailAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex);
if(forceImmediateSaving) if(forceImmediateSaving)
UBSvgSubsetAdaptor::persistScene(pDocumentProxy,pScene,pSceneIndex); UBSvgSubsetAdaptor::persistScene(pDocumentProxy,pScene,pSceneIndex);

@ -44,7 +44,7 @@ class UBDocumentContainer : public QObject
void setDocument(UBDocumentProxy* document, bool forceReload = false); void setDocument(UBDocumentProxy* document, bool forceReload = false);
UBDocumentProxy* selectedDocument(){return mCurrentDocument;} UBDocumentProxy* selectedDocument(){return mCurrentDocument;}
int pageCount(){return mDocumentThumbs.size();} int pageCount(){return mCurrentDocument->pageCount();}
const QPixmap* pageAt(int index){return mDocumentThumbs[index];} const QPixmap* pageAt(int index){return mDocumentThumbs[index];}
static int pageFromSceneIndex(int sceneIndex); static int pageFromSceneIndex(int sceneIndex);

@ -168,7 +168,7 @@ void UBDocumentController::selectDocument(UBDocumentProxy* proxy, bool setAsCurr
if (selected) if (selected)
{ {
setDocument(proxy); setDocument(proxy);
reloadThumbnails(); emit documentThumbnailsUpdated(this);
selected->setSelected(true); selected->setSelected(true);
@ -1441,7 +1441,7 @@ void UBDocumentController::documentSceneChanged(UBDocumentProxy* proxy, int pSce
if (proxy == selectedDocumentProxy()) if (proxy == selectedDocumentProxy())
{ {
reloadThumbnails(); emit documentThumbnailsUpdated(this);
} }
} }

@ -907,13 +907,15 @@ void UBDraggableThumbnail::mousePressEvent(QGraphicsSceneMouseEvent *event)
event->accept(); event->accept();
duplicatePage(); duplicatePage();
} }
else
{
event->ignore();
}
/* /*
else if(movableUp() && getIcon("moveUp")->triggered(p.x())) else if(movableUp() && getIcon("moveUp")->triggered(p.x()))
moveUpPage(); moveUpPage();
else if (movableDown() && getIcon("moveDown")->triggered(p.x())) else if (movableDown() && getIcon("moveDown")->triggered(p.x()))
moveDownPage();*/ moveDownPage();*/
event->ignore();
} }
else else
{ {

Loading…
Cancel
Save