ItEr46S18RFComportamentoGraficoPlanificadorItEr31S05: Planner keeps track if initial zoom level is set or not
This commit is contained in:
parent
d9bcc10b80
commit
155f40174e
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue