diff --git a/Source/Heavy/WASMExporter.h b/Source/Heavy/WASMExporter.h index 63de3eec2..555e4feb1 100644 --- a/Source/Heavy/WASMExporter.h +++ b/Source/Heavy/WASMExporter.h @@ -19,6 +19,8 @@ class WASMExporter : public ExporterBase { property->setPreferredHeight(28); } + emsdkPathValue.addListener(this); + panel.addSection("WASM", properties); } @@ -43,6 +45,19 @@ class WASMExporter : public ExporterBase { emsdkPathValue = tree.getProperty("emsdkPathValue"); } + void valueChanged(Value& v) override + { + ExporterBase::valueChanged(v); + + String const emsdkPath = getValue(emsdkPathValue); + + if (emsdkPath.isNotEmpty()) { + exportButton.setEnabled(true); + } else { + exportButton.setEnabled(false); + } + } + bool performExport(String pdPatch, String outdir, String name, String copyright, StringArray searchPaths) override { exportingView->showState(ExportingProgressView::Exporting);