Commit 2def311e authored by Ivan Ilin's avatar Ivan Ilin

Sankore 431 fixed

parent 93424100
......@@ -1039,7 +1039,6 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::persistScenes()
UBThumbnailAdaptor::persistScene(mProxy->persistencePath(), tmpScene, i);
delete tmpScene;
mCurrentScene->setModified(false);
}
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment