Bug 87978 - Incorrect plot is selected in plot dialog after creating a new window
Summary: Incorrect plot is selected in plot dialog after creating a new window
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Rick Chern
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-24 23:11 UTC by Rick Chern
Modified: 2004-08-25 00:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Chern 2004-08-24 23:11:02 UTC
Version:           1.0.0_devel (using KDE KDE 3.2.1)
Installed from:    Unlisted Binary Package
OS:                Linux

How to reproduce:
- start kst
- create some plots in a window using data wizard
- create some plots in a new window using data wizard, or manually
- click on the axis region of the one of the plots in the 2nd window to bring up the plot dialog

The incorrect window and plot are selected in the dialog.

Expected behaviour:
The correct window and plot are selected.
Comment 1 Rick Chern 2004-08-25 00:21:41 UTC
CVS commit by rchern: 

When setting the window caption, also set the tagName of the topLevelView

CCMAIL: 87978-done@bugs.kde.org


  M +2 -0      ksttoplevelview.cpp   1.74
  M +6 -1      kstviewwindow.cpp   1.37
  M +1 -0      kstviewwindow.h   1.24


--- kdeextragear-2/kst/kst/ksttoplevelview.cpp  #1.73:1.74
@@ -33,4 +33,5 @@ KstTopLevelView::KstTopLevelView(QWidget
 : KstViewObject("KstTopLevelView"), _w(new KstViewWidget(this, parent, name, w)) {
   _onGrid = true;
+  setTagName(name);
   commonConstructor();
 }

--- kdeextragear-2/kst/kst/kstviewwindow.cpp  #1.36:1.37
@@ -34,5 +34,5 @@ KstViewWindow::KstViewWindow(QWidget *pa
 : KMdiChildView(QString::null, parent, name) {
   commonConstructor();
-  _view = new KstTopLevelView(this);
+  _view = new KstTopLevelView(this, name);
 }
 
@@ -250,4 +250,9 @@ KstTopLevelViewPtr KstViewWindow::view()
 }
 
+void KstViewWindow::setCaption(const QString& szCaption) {
+  KMdiChildView::setCaption(szCaption);
+  _view->setTagName(szCaption);
+}
+
 #include "kstviewwindow.moc"
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/kstviewwindow.h  #1.23:1.24
@@ -45,4 +45,5 @@ class KstViewWindow : public KMdiChildVi
     void save(QTextStream& ts);
     KstTopLevelViewPtr view() const;
+    virtual void setCaption(const QString& szCaption);
 
   protected: