GUI: possibly fix asset name carry-over issue

issue #1155
This commit is contained in:
tildearrow 2023-06-11 18:20:07 -05:00
parent c51413fe37
commit 7f0dc576d8
3 changed files with 5 additions and 0 deletions

View file

@ -2262,9 +2262,11 @@ void FurnaceGUI::drawInsEdit() {
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
ImGui::PushID(2+curIns);
if (ImGui::InputText("##Name",&ins->name)) { if (ImGui::InputText("##Name",&ins->name)) {
MARK_MODIFIED; MARK_MODIFIED;
} }
ImGui::PopID();
ImGui::TableNextRow(); ImGui::TableNextRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();

View file

@ -95,6 +95,7 @@ void FurnaceGUI::endIntroTune() {
selEnd=SelectionPoint(); selEnd=SelectionPoint();
cursor=SelectionPoint(); cursor=SelectionPoint();
updateWindowTitle(); updateWindowTitle();
updateScroll(0);
} }
void FurnaceGUI::drawIntro(double introTime, bool monitor) { void FurnaceGUI::drawIntro(double introTime, bool monitor) {

View file

@ -158,9 +158,11 @@ void FurnaceGUI::drawSampleEdit() {
ImGui::Text("Name"); ImGui::Text("Name");
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
ImGui::PushID(2+curSample);
if (ImGui::InputText("##SampleName",&sample->name)) { if (ImGui::InputText("##SampleName",&sample->name)) {
MARK_MODIFIED; MARK_MODIFIED;
} }
ImGui::PopID();
ImGui::Separator(); ImGui::Separator();