GUI: fix possible issue when changing sample depth
This commit is contained in:
parent
019b036853
commit
5ee41c5f5e
|
@ -227,11 +227,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
if (sampleDepths[i]==NULL) continue;
|
if (sampleDepths[i]==NULL) continue;
|
||||||
if (ImGui::Selectable(sampleDepths[i])) {
|
if (ImGui::Selectable(sampleDepths[i])) {
|
||||||
sample->prepareUndo(true);
|
sample->prepareUndo(true);
|
||||||
e->lockEngine([sample]() {
|
e->lockEngine([this,sample,i]() {
|
||||||
sample->render();
|
sample->render();
|
||||||
});
|
|
||||||
sample->depth=(DivSampleDepth)i;
|
sample->depth=(DivSampleDepth)i;
|
||||||
e->renderSamplesP();
|
e->renderSamples();
|
||||||
|
});
|
||||||
updateSampleTex=true;
|
updateSampleTex=true;
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue