Discussion:
[kst] [Bug 394742] New: Shared axis plot x-zoom does not work if tied with third plot
b***@kde.org
2018-05-27 11:52:06 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=394742

Bug ID: 394742
Summary: Shared axis plot x-zoom does not work if tied with
third plot
Product: kst
Version: 2.0.8
Platform: MS Windows
OS: MS Windows
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: plotting
Assignee: ***@kde.org
Reporter: ***@hotmail.de
Target Milestone: ---

What I did:
- Create three plots A, B, C, and put two of them in a shared axis box (A, B)
- Tie the x-zoom for all three plots (Ctrl-t)
- Click on plot C to select it, then zomm right (push arrow right key)

What I expected to happen:
- All three plots should shift synchronously

What happened instead:
- While C shifts as desired, the plots A, B, with shared Axis, get shifted
twice.

I looked at the code, and found the problem dissapears, when I delete the
following lines in method void ZoomCommand::redo():
foreach (ViewItem* item, _viewItems) {
applyZoomTo(item, tiedX, tiedY);
}
Or equally, if I delete following from method ZoomCommand::ZoomCommand(PlotItem
*item, const QString &text, bool forced):
_viewItems << plotItem->sharedAxisBox();


Possibly easy to fix, because_viewItems is not used in other locations. But I'm
still not familiar enough with the code.

Manuel
--
You are receiving this mail because:
You are the assignee for the bug.
b***@kde.org
2018-09-12 19:12:10 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=394742

***@astro.utoronto.ca changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Latest Commit| |https://commits.kde.org/kst
| |-plot/64f76e7329907258be921
| |b441b7e22ecd77fe43b

--- Comment #1 from ***@astro.utoronto.ca ---
Git commit 64f76e7329907258be921b441b7e22ecd77fe43b by Barth Netterfield.
Committed on 12/09/2018 at 19:11.
Pushed by netterfield into branch 'master'.

Fix zooming/scrolling with tied and shared plots.

In some cases, plots that were both tied and shared would get the
command twice. This fixes that - hopefully without regressions.

M +4 -2 src/libkstapp/plotitem.cpp
M +208 -155 src/libkstapp/sharedaxisboxitem.cpp

https://commits.kde.org/kst-plot/64f76e7329907258be921b441b7e22ecd77fe43b
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...