Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
commit bee03f1b47
  1. 1
      src/adaptors/UBCFFSubsetAdaptor.cpp
  2. 6
      src/board/UBBoardController.cpp
  3. 13
      src/gui/UBDocumentTreeWidget.cpp
  4. 2
      src/gui/UBDocumentTreeWidget.h
  5. 2
      src/gui/UBThumbnailView.h

@ -1039,7 +1039,6 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::persistScenes()
UBThumbnailAdaptor::persistScene(mProxy->persistencePath(), tmpScene, i);
delete tmpScene;
mCurrentScene->setModified(false);
}

@ -777,6 +777,12 @@ void UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString
{
QString mimeType = pContentTypeHeader;
// In some cases "image/jpeg;charset=" is retourned by the drag-n-drop. That is
// why we will check if an ; exists and take the first part (the standard allows this kind of mimetype)
int position=mimeType.indexOf(";");
if(position != -1)
mimeType=mimeType.left(position);
if (!pSuccess)
{
UBApplication::showMessage(tr("Downloading content %1 failed").arg(sourceUrl.toString()));

@ -25,6 +25,10 @@
#include "core/UBDocumentManager.h"
#include "document/UBDocumentController.h"
#include "adaptors/UBThumbnailAdaptor.h"
#include "adaptors/UBSvgSubsetAdaptor.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/memcheck.h"
UBDocumentTreeWidget::UBDocumentTreeWidget(QWidget * parent)
@ -290,7 +294,14 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
}
UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(targetDocProxy, sceneClone, targetDocProxy->pageCount());
}
//due to incorrect generation of thumbnails of invisible scene I've used direct copying of thumbnail files
//it's not universal and good way but it's faster
QString from = sourceItem.documentProxy()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceItem.sceneIndex() + 1);
QString to = targetDocProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetDocProxy->pageCount());
QFile::remove(to);
QFile::copy(from, to);
}
}
QApplication::restoreOverrideCursor();

@ -23,7 +23,7 @@ class UBDocumentProxyTreeItem;
class UBDocumentTreeWidget : public QTreeWidget
{
Q_OBJECT;
Q_OBJECT
public:
UBDocumentTreeWidget(QWidget *parent = 0);

@ -22,7 +22,7 @@ class UBGraphicsScene;
class UBThumbnailView : public QGraphicsView
{
Q_OBJECT;
Q_OBJECT
public:
UBThumbnailView();

Loading…
Cancel
Save