Prevent unnecessary layoutManager update when toggling enlargement

This commit is contained in:
Erik Ziegler 2016-08-10 10:56:44 +02:00
parent 131fe7ff99
commit 2dbeea31a0

View File

@ -213,7 +213,11 @@ LayoutManager = class LayoutManager {
if (this.isZoomed) {
this.resetPreviousLayout();
} else {
this.enlargeViewport(viewportIndex);
// Don't enlarge the viewport if we only have one Viewport
// to begin with
if (this.getNumberOfViewports() > 1) {
this.enlargeViewport(viewportIndex);
}
}
}
};