GUI: focus sample editor when clicking on waveform

This commit is contained in:
tildearrow 2022-04-12 02:46:51 -05:00
parent ea463e4dfd
commit 3b0be2c42a

View file

@ -29,7 +29,6 @@
#include "util.h" #include "util.h"
// TODO: // TODO:
// - clicking on waveform should give this window focus
// - add "create instrument using this sample" option // - add "create instrument using this sample" option
// - .dmc loading // - .dmc loading
void FurnaceGUI::drawSampleEdit() { void FurnaceGUI::drawSampleEdit() {
@ -1192,6 +1191,7 @@ void FurnaceGUI::drawSampleEdit() {
ImVec2 rectSize=ImGui::GetItemRectSize(); ImVec2 rectSize=ImGui::GetItemRectSize();
if (ImGui::IsItemClicked()) { if (ImGui::IsItemClicked()) {
nextWindow=GUI_WINDOW_SAMPLE_EDIT;
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) {
sampleDragActive=false; sampleDragActive=false;
sampleSelStart=0; sampleSelStart=0;