go to a certain location
( loc_index )
| 80 | |
| 81 | # go to a certain location |
| 82 | def navigate( loc_index ) |
| 83 | |
| 84 | if loc_index < @boxes.size |
| 85 | |
| 86 | # mark this location as visited |
| 87 | @visited[loc_index] = true |
| 88 | |
| 89 | # place the marker on the current view. If no view is opened, this may be nil! |
| 90 | view = RBA::Application::instance.main_window.current_view |
| 91 | if view != nil |
| 92 | |
| 93 | # zoom to the specified position (put 10 micron space around that location to |
| 94 | # get the displayed rectangle) |
| 95 | box = @boxes[loc_index] |
| 96 | view.zoom_box( box.enlarged( RBA::DPoint::new_xy( 10.0, 10.0 ) ) ) |
| 97 | |
| 98 | # before creating a new marker, delete the current marker unless it was destroyed already |
| 99 | # (this is a recommended safty measure) |
| 100 | if @marker != nil && !@marker.destroyed |
| 101 | @marker.destroy |
| 102 | end |
| 103 | |
| 104 | # create a new marker that shows the box selected |
| 105 | @marker = RBA::Marker::new( view ) |
| 106 | @marker.set_box( box ) |
| 107 | |
| 108 | end |
| 109 | |
| 110 | # force a reload of the page (necessary, since the color of the links may have changed) |
| 111 | @browser.reload |
| 112 | |
| 113 | end |
| 114 | |
| 115 | end |
| 116 | |
| 117 | end |
| 118 |
nothing calls this directly
no test coverage detected