[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Sat Nov 13 22:08:02 CET 2010
SVN commit 1196661 by netterfield:
CCBUG: 254922
Fix clipping when dragging.
M +1 -1 datasources/dirfilesource/dirfilesource.cpp
M +6 -2 libkst/datasource.cpp
M +2 -1 libkst/datasource.h
M +1 -1 libkst/datasourcepluginmanager.cpp
M +2 -1 libkstapp/viewitem.cpp
--- branches/work/kst/portto4/kst/src/datasources/dirfilesource/dirfilesource.cpp #1196660:1196661
@@ -19,7 +19,7 @@
#include "kst_i18n.h"
#include <QXmlStreamWriter>
-#include <QFileSystemWatcher>
+//#include <QFileSystemWatcher>
#include <QDir>
using namespace Kst;
--- branches/work/kst/portto4/kst/src/libkst/datasource.cpp #1196660:1196661
@@ -30,7 +30,7 @@
#include <QUrl>
#include <QXmlStreamWriter>
#include <QTimer>
-#include <QFileSystemWatcher>
+//#include <QFileSystemWatcher>
#include <QFSFileEngine>
#include "kst_i18n.h"
@@ -166,12 +166,14 @@
void DataSource::resetFileWatcher() {
+#if 0
if (_watcher) {
disconnect(_watcher, SIGNAL(fileChanged ( const QString & )), this, SLOT(checkUpdate()));
disconnect(_watcher, SIGNAL(directoryChanged ( const QString & )), this, SLOT(checkUpdate()));
delete _watcher;
_watcher = 0L;
}
+#endif
}
@@ -206,8 +208,9 @@
{
_updateCheckType = updateType;
resetFileWatcher();
- if (_updateCheckType == Timer) {
+ //if (_updateCheckType == Timer) {
QTimer::singleShot(UpdateManager::self()->minimumUpdatePeriod()-1, this, SLOT(checkUpdate()));
+#if 0
} else if (_updateCheckType == File) {
// TODO only works on local files:
// http://bugreports.qt.nokia.com/browse/QTBUG-8351
@@ -218,6 +221,7 @@
connect(_watcher, SIGNAL(fileChanged ( const QString & )), this, SLOT(checkUpdate()));
connect(_watcher, SIGNAL(directoryChanged ( const QString & )), this, SLOT(checkUpdate()));
}
+#endif
}
--- branches/work/kst/portto4/kst/src/libkst/datasource.h #1196660:1196661
@@ -235,8 +235,9 @@
DataInterface<DataVector>* interf_vector;
DataInterface<DataMatrix>* interf_matrix;
- QFileSystemWatcher *_watcher;
+ //QFileSystemWatcher *_watcher;
+ int _watcher;
// NOTE: You must bump the version key if you add new member variables
// or change or add virtual functions.
};
--- branches/work/kst/portto4/kst/src/libkst/datasourcepluginmanager.cpp #1196660:1196661
@@ -28,7 +28,7 @@
#include <QUrl>
#include <QXmlStreamWriter>
#include <QTimer>
-#include <QFileSystemWatcher>
+//#include <QFileSystemWatcher>
#include "kst_i18n.h"
#include "datacollection.h"
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1196660:1196661
@@ -951,6 +951,7 @@
// not moving a plot it also has no transparent background
//pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
+ painter.translate(-rect().left(), -rect().top());
paint(&painter); // TODO also paint annotations
QList<QGraphicsItem*> children = childItems();
foreach(QGraphicsItem* child, children) {
@@ -962,7 +963,7 @@
painter.end();
drag->setPixmap(pixmap);
- drag->setHotSpot(hotspot.toPoint());
+ drag->setHotSpot(hotspot.toPoint()- rect().topLeft().toPoint());
hide();
Qt::DropActions dact = Qt::MoveAction;
More information about the Kst
mailing list