Issue #1208 change density and mag handlers in d2d to not throw exceptions.
Former-commit-id:f20812bc11
[formerlyf20812bc11
[formerly b7c0ef15d9e8c27cd3ce646b393c6c44315eabef]] Former-commit-id:3f4bfb8efe
Former-commit-id:6e8bca348f
This commit is contained in:
parent
8fc544b44f
commit
4372a4e0d6
2 changed files with 4 additions and 3 deletions
|
@ -81,7 +81,7 @@ public class DensityHandler extends AbstractHandler implements IElementUpdater {
|
|||
IDisplayPane[] panes = container.getDisplayPanes();
|
||||
for (IDisplayPane pane : panes) {
|
||||
IRenderableDisplay disp = pane.getRenderableDisplay();
|
||||
if (disp != null) {
|
||||
if (disp != null && disp instanceof ID2DRenderableDisplay) {
|
||||
((ID2DRenderableDisplay) disp).setDensity(density);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,11 +73,12 @@ public class MagHandler extends AbstractHandler implements IElementUpdater {
|
|||
double magnification = Double.parseDouble((arg0
|
||||
.getParameter("magnification")));
|
||||
if (editor != null) {
|
||||
if (magnification == 0.0f) magnification=0.1;
|
||||
if (magnification == 0.0f)
|
||||
magnification = 0.1;
|
||||
IDisplayPane[] panes = editor.getDisplayPanes();
|
||||
for (IDisplayPane pane : panes) {
|
||||
IRenderableDisplay disp = pane.getRenderableDisplay();
|
||||
if (disp != null) {
|
||||
if (disp != null && disp instanceof ID2DRenderableDisplay) {
|
||||
((ID2DRenderableDisplay) disp)
|
||||
.setMagnification(magnification);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue