| Summary: | Shared axis plot x-zoom does not work if tied with third plot | ||
|---|---|---|---|
| Product: | [Applications] kst | Reporter: | manumail |
| Component: | plotting | Assignee: | kst |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 2.0.8 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://commits.kde.org/kst-plot/64f76e7329907258be921b441b7e22ecd77fe43b | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
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 |
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