ItEr46S18RFComportamentoGraficoPlanificadorItEr31S05: Planner keeps track if initial zoom level is set or not

This commit is contained in:
Óscar González Fernández 2010-02-05 14:19:58 +01:00
parent d9bcc10b80
commit 155f40174e

View file

@ -123,7 +123,7 @@ public class Planner extends HtmlMacroComponent {
private boolean isShowingCriticalPath = false;
private ZoomLevel initialZoomLevel = ZoomLevel.DETAIL_ONE;
private ZoomLevel initialZoomLevel = null;
public Planner() {
registerNeededScripts();
@ -452,11 +452,16 @@ public class Planner extends HtmlMacroComponent {
public ZoomLevel getZoomLevel() {
if (ganttPanel == null) {
return initialZoomLevel;
return initialZoomLevel != null ? initialZoomLevel
: ZoomLevel.DETAIL_ONE;
}
return ganttPanel.getTimeTracker().getDetailLevel();
}
public boolean isInitialZoomLevelAlreadySet() {
return this.initialZoomLevel != null;
}
public void setInitialZoomLevel(final ZoomLevel zoomLevel) {
this.initialZoomLevel = zoomLevel;
}