TAChart: chart tools may try to use uninitialized chart scaling
Original Reporter info from Mantis: Marcin Wiazowski
-
Reporter name:
Original Reporter info from Mantis: Marcin Wiazowski
- Reporter name:
Description:
Launch the attached Reproduce application. It starts with an exception: "[Chart1.XImageToGraph]: Image-graph scaling not yet initialized".
This is because chart's MouseMove event is fired immediately after the chart appears on the screen, so chart tool tries to do its work - but chart's scaling is not yet initialized.
Possible solution is quite simple: chart tools have nothing to do, when chart's scaling is not yet initialized - so it's enough to check for valid scaling in TChartToolset.Dispatch(), as it is performed in the attached patch.
Mantis conversion info:
- Mantis ID: 35337
- Build: 60865
- Version: 2.1 (SVN)
- Fixed in revision: 60894 (#6d39a8ac)
- Target version: 2.2