GUI: fix possible issue when changing sample depth

This commit is contained in:
tildearrow 2022-12-21 13:39:43 -05:00
parent 019b036853
commit 5ee41c5f5e
1 changed files with 3 additions and 3 deletions

View File

@ -227,11 +227,11 @@ void FurnaceGUI::drawSampleEdit() {
if (sampleDepths[i]==NULL) continue;
if (ImGui::Selectable(sampleDepths[i])) {
sample->prepareUndo(true);
e->lockEngine([sample]() {
e->lockEngine([this,sample,i]() {
sample->render();
sample->depth=(DivSampleDepth)i;
e->renderSamples();
});
sample->depth=(DivSampleDepth)i;
e->renderSamplesP();
updateSampleTex=true;
MARK_MODIFIED;
}