Skip to content

Commit

Permalink
Fix small issue with goto window
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Nov 7, 2023
1 parent ea76ddb commit d68ea48
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4592,12 +4592,14 @@ void Gui::drawGOTOWidget()

if (ImGui::Begin("GO TO MENU", &showGOTOWidget, 0))
{
entid = g_app->pickInfo.GetSelectedEnt();
if (entid == -1)
entid = g_app->pickInfo.GetSelectedEnt();
ImGuiStyle& style = ImGui::GetStyle();
float padding = style.WindowPadding.x * 2 + style.FramePadding.x * 2;
float inputWidth = (ImGui::GetWindowWidth() - (padding + style.ScrollbarSize)) * 0.33f;
if (showGOTOWidget_update)
{
entid = g_app->pickInfo.GetSelectedEnt();
coordinates = cameraOrigin;
angles = cameraAngles;
showGOTOWidget_update = false;
Expand Down Expand Up @@ -5348,7 +5350,7 @@ void Gui::drawSettings()
ImGui::BeginTooltip();
ImGui::TextUnformatted("Verbose logging can't be disabled in DEBUG MODE");
ImGui::EndTooltip();
}
}
#endif
ImGui::SameLine();

Expand Down Expand Up @@ -5426,7 +5428,7 @@ void Gui::drawSettings()
ImGui::TextUnformatted("Warning! You want to return all settings to default values?!");
ImGui::EndTooltip();
}
}
}
else if (settingsTab == 1)
{
for (int i = 0; i < g_settings.fgdPaths.size(); i++)
Expand Down Expand Up @@ -5905,7 +5907,7 @@ void Gui::drawSettings()
ImGui::EndChild();

ImGui::EndGroup();
}
}
ImGui::End();


Expand Down

0 comments on commit d68ea48

Please sign in to comment.