Explicitly show viewport 0 in the SpatialEditorPlugin if the container is large enough.

This commit is contained in:
Dominique LaSalle 2018-09-30 10:09:31 -07:00
parent 3ee657e7a7
commit df06087057

View file

@ -3726,6 +3726,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
case VIEW_USE_1_VIEWPORT: {
viewports[0]->show();
for (int i = 1; i < 4; i++) {
viewports[i]->hide();
@ -3736,7 +3737,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_2_VIEWPORTS: {
for (int i = 1; i < 4; i++) {
for (int i = 0; i < 4; i++) {
if (i == 1 || i == 3)
viewports[i]->hide();
@ -3750,7 +3751,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_2_VIEWPORTS_ALT: {
for (int i = 1; i < 4; i++) {
for (int i = 0; i < 4; i++) {
if (i == 1 || i == 3)
viewports[i]->hide();
@ -3763,7 +3764,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_3_VIEWPORTS: {
for (int i = 1; i < 4; i++) {
for (int i = 0; i < 4; i++) {
if (i == 1)
viewports[i]->hide();
@ -3778,7 +3779,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_3_VIEWPORTS_ALT: {
for (int i = 1; i < 4; i++) {
for (int i = 0; i < 4; i++) {
if (i == 1)
viewports[i]->hide();
@ -3793,7 +3794,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
} break;
case VIEW_USE_4_VIEWPORTS: {
for (int i = 1; i < 4; i++) {
for (int i = 0; i < 4; i++) {
viewports[i]->show();
}