02-13-2012 06:05 AM
Hi,
Thanks!
Solved! Go to Solution.
02-13-2012 05:38 PM
1. No it is not possible to disable ZOOM_OUT, but not ZOOM_IN. You also cannot swallow the EVENT_ZOOM.
2. There is not a way to trigger ZOOM_RESTORE. The event is handled completely internal to the CVI RTE. You could store the original min and max for the axis ranges and restore these using SetCtrlAttribute( ) with an event on the graph or a separate button.
02-14-2012 02:48 AM
Thank you!
Concerning my question 2 I have to be more precise: I do not want to trigger ZOOM_RESTORE, I want to know which action causes this event to appear. For example, pressing Ctrl + SPACE causes this event to be fired, but it appears to me that also Ctrl + LeftClick (without moving the mouse) may result in this event....? I am wondering if the latter is a correct observation?
02-14-2012 01:55 PM
You are correct. There are 2 scenarios that the ZOOM_RESTORE event is triggered.
1. Pressing Ctrl + SPACE.
2. Ctrl + LeftClick while in Zoom to Rectangle mode, the mouse has not moved, and you do not have any zooms in the undo history. When doing a rectangle zoom, it creates a temporary undo record for the zoom in progress and must remove it if the zoom is not valid (no zoom region selected). If you have zooms in the undo history already (by that I mean you have already zoomed in at least once), then we have an easier way to remove this undo record, but if this is the first zoom, then we have to reset this record and we do that using the same routine as the ZOOM_RESTORE.
I think this behavior might be misleading if you are trying to catch the ZOOM_RESTORE event, so I have filed bug report 338093 and we will see if we can find a better way to handle this.
02-15-2012 02:06 AM
Thank you very much for confirmation and the detailed explanation!