Add Imgui popup for rotation gizmo under SLA

This commit is contained in:
tamasmeszaros 2020-09-01 20:08:59 +02:00
parent b4b9af4100
commit 9f3e7617d8
3 changed files with 112 additions and 20 deletions

View file

@ -425,10 +425,10 @@ bool ImGuiWrapper::combo(const wxString& label, const std::vector<std::string>&
text(label);
ImGui::SameLine();
int selection_out = -1;
int selection_out = selection;
bool res = false;
const char *selection_str = selection < (int)options.size() ? options[selection].c_str() : "";
const char *selection_str = selection < int(options.size()) && selection >= 0 ? options[selection].c_str() : "";
if (ImGui::BeginCombo("", selection_str)) {
for (int i = 0; i < (int)options.size(); i++) {
if (ImGui::Selectable(options[i].c_str(), i == selection)) {