개정판 0977184e
issue #505: fix zoom cmd
Change-Id: Iad142ea65c65b235976b41412242761e8fc7dca6
DTI_PID/DTI_PID/Commands/AreaZoomCommand.py | ||
---|---|---|
71 | 71 |
current_rect = self.imageViewer.zoomStack[-1] |
72 | 72 |
current_area = current_rect.width() * current_rect.height() |
73 | 73 |
new_area = rect.width() * rect.height() |
74 |
area_ratio = 100 - (new_area / current_area * 100) |
|
75 |
zoomStack_count = int(area_ratio / 40) |
|
76 |
if zoomStack_count > 1 and current_area > 4500000: |
|
74 |
zoomStack_count = 0 |
|
75 |
if current_area > 4500000 and new_area > 100000: |
|
76 |
area_ratio = 100 - (new_area / current_area * 100) |
|
77 |
zoomStack_count = int(area_ratio / 40) |
|
78 |
|
|
79 |
if zoomStack_count > 1: |
|
77 | 80 |
current_center = current_rect.center() |
78 | 81 |
new_center = rect.center() |
79 | 82 |
|
내보내기 Unified diff