Skip to content

Commit

Permalink
prevent subdividing faces while map is loading
Browse files Browse the repository at this point in the history
those actions cause crashes while loading/refreshing the map
  • Loading branch information
wootguy committed May 30, 2024
1 parent 337515f commit 9b444e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ void Gui::draw3dContextMenus() {
}
tooltip(g, "Selects faces connected to this one which lie on the same plane and use the same texture");

if (ImGui::MenuItem("Downscale texture")) {
if (ImGui::MenuItem("Downscale texture", 0, false, !app->isLoading)) {
if (!app->pickInfo.valid) {
return;
}
Expand Down Expand Up @@ -551,7 +551,7 @@ void Gui::draw3dContextMenus() {
}
tooltip(g, "Reduces the dimensions of this texture down to the next power of 2.");

if (ImGui::MenuItem("Subdivide")) {
if (ImGui::MenuItem("Subdivide", 0, false, !app->isLoading)) {
if (!app->pickInfo.valid) {
return;
}
Expand All @@ -565,7 +565,7 @@ void Gui::draw3dContextMenus() {
}
tooltip(g, "Split this face across the axis with the most texture pixels.");

if (ImGui::MenuItem("Subdivide until valid")) {
if (ImGui::MenuItem("Subdivide until valid", 0, false, !app->isLoading)) {
if (!app->pickInfo.valid) {
return;
}
Expand Down

0 comments on commit 9b444e8

Please sign in to comment.