[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Fri Jun 21 14:16:55 UTC 2013
SVN commit 1358065 by netterfield:
Bugfix:
When an object was dragged to a new tab, the children of the object did not have their parent
item updated. So when the former parent tab was deleted... bad things could happen.
This fixes that.
M +3 -3 datasources/healpix/healpix.cpp
M +1 -1 datasources/healpix/healpix.h
M +2 -1 datasources/healpix/healpix_tools.h
M +1 -7 libkstapp/scene.cpp
M +8 -0 libkstapp/viewitem.cpp
--- branches/work/kst/portto4/kst/src/datasources/healpix/healpix.cpp #1358064:1358065
@@ -406,7 +406,7 @@
HealpixSource::HealpixSource(Kst::ObjectStore *store, QSettings *cfg, const QString& filename, const QString& type, const QDomElement& e)
-: Kst::DataSource(store, cfg, filename, type, None), _config(0L) {
+: Kst::DataSource(store, cfg, filename, type), _config(0L) {
_valid = false;
if (!type.isEmpty() && type != "HEALPIX Source") {
@@ -440,8 +440,8 @@
}
-bool HealpixSource::reset() {
- return true;
+void HealpixSource::reset() {
+ return;
}
--- branches/work/kst/portto4/kst/src/datasources/healpix/healpix.h #1358064:1358065
@@ -29,7 +29,7 @@
~HealpixSource();
bool init();
- bool reset();
+ virtual void reset();
Kst::Object::UpdateType update();
--- branches/work/kst/portto4/kst/src/datasources/healpix/healpix_tools.h #1358064:1358065
@@ -19,7 +19,8 @@
#define HEALPIX_TOOLS_H
#include <math.h>
-#include <libcfitsio0/fitsio.h>
+//#include <libcfitsio0/fitsio.h>
+#include <fitsio.h>
#include <datasource.h>
# ifdef HEALPIX_PI
--- branches/work/kst/portto4/kst/src/libkstapp/scene.cpp #1358064:1358065
@@ -86,13 +86,7 @@
}
if (view != m->item->view()) {
m->item->setView(view);
- PlotItem* plotItem = qobject_cast<PlotItem*>(m->item);
- if (plotItem) {
- QList<PlotRenderItem*> renderItems = plotItem->renderItems();
- foreach (PlotRenderItem* renderItem, renderItems) {
- renderItem->setView(view);
- }
- }
+
m->item->setParentViewItem(0);
addItem(m->item);
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1358064:1358065
@@ -605,7 +605,15 @@
void ViewItem::setView(View* parentView) {
QObject::setParent(parentView);
reRegisterShortcut();
+
+ QList<QGraphicsItem*> list = QGraphicsItem::childItems();
+ foreach (QGraphicsItem *item, list) {
+ ViewItem *viewItem = dynamic_cast<ViewItem*>(item);
+ if (viewItem) {
+ viewItem->setView(parentView);
}
+ }
+}
ViewItem *ViewItem::parentViewItem() const {
More information about the Kst
mailing list