[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Thu Sep 2 16:34:53 CEST 2010
SVN commit 1171048 by kuemmel:
also reparent renderItems
CCBUG: 249253
M +9 -1 tabwidget.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/tabwidget.cpp #1171047:1171048
@@ -14,8 +14,9 @@
#include "view.h"
#include "viewitem.h"
#include "curveplacement.h"
+#include "plotitem.h"
+#include "plotrenderitem.h"
-
#include <QInputDialog>
#include <QMenu>
#include <QTabBar>
@@ -62,6 +63,13 @@
if (m && m->item) {
View* view = tabWidget->currentView();
m->item->setParentView(view);
+ PlotItem* plotItem = qobject_cast<PlotItem*>(m->item);
+ if (plotItem) {
+ QList<PlotRenderItem*> renderItems = plotItem->renderItems();
+ foreach (PlotRenderItem* renderItem, renderItems) {
+ renderItem->setParentView(view);
+ }
+ }
m->item->setParentViewItem(0);
view->appendToLayout(CurvePlacement::Auto, m->item);
event->acceptProposedAction();
More information about the Kst
mailing list