277 |
delegated_methods = {"SelectLayer": "selection", |
delegated_methods = {"SelectLayer": "selection", |
278 |
"SelectShapes": "selection", |
"SelectShapes": "selection", |
279 |
"SelectedLayer": "selection", |
"SelectedLayer": "selection", |
280 |
"HasSelectedLayer": "selection"} |
"HasSelectedLayer": "selection", |
281 |
|
"HasSelectedShapes": "selection"} |
282 |
|
|
283 |
def __init__(self, parent, winid): |
def __init__(self, parent, winid): |
284 |
wxWindow.__init__(self, parent, winid) |
wxWindow.__init__(self, parent, winid) |
529 |
if bbox is not None: |
if bbox is not None: |
530 |
proj = self.map.GetProjection() |
proj = self.map.GetProjection() |
531 |
if proj is not None: |
if proj is not None: |
532 |
|
bbox = proj.ForwardBBox(bbox) |
533 |
|
|
534 |
|
if bbox is not None: |
535 |
|
self.FitRectToWindow(bbox) |
536 |
|
|
537 |
|
def FitSelectedToWindow(self): |
538 |
|
layer = self.selection.SelectedLayer() |
539 |
|
shapes = self.selection.SelectedShapes() |
540 |
|
|
541 |
|
bbox = layer.ShapesBoundingBox(shapes) |
542 |
|
if bbox is not None: |
543 |
|
proj = self.map.GetProjection() |
544 |
|
if proj is not None: |
545 |
bbox = proj.ForwardBBox(bbox) |
bbox = proj.ForwardBBox(bbox) |
546 |
|
|
547 |
if bbox is not None: |
if bbox is not None: |