Disable editor

This commit is contained in:
Aang23 2018-08-20 20:19:19 +01:00
parent a354f9a530
commit 133369883b
2 changed files with 9 additions and 5 deletions

View file

@ -25,6 +25,7 @@ namespace satdump
bool enabled = true;
float progress = 0;
bool old_algo = false;
bool allow_editor = false;
unsigned int preview_texid = 0;
unsigned int getPreview()

View file

@ -389,11 +389,14 @@ namespace satdump
}
ImGui::ProgressBar(layer.progress, ImVec2(ImGui::GetWindowWidth() - 76 * ui_scale, ImGui::GetFrameHeight()));
ImGui::Separator();
auto js = image::get_metadata_proj_cfg(layer.img);
widgets::JSONTableEditor(js, "THEJSONEDITOR");
image::set_metadata_proj_cfg(layer.img, js);
ImGui::Separator();
if (layer.allow_editor)
{
ImGui::Separator();
auto js = image::get_metadata_proj_cfg(layer.img);
widgets::JSONTableEditor(js, "THEJSONEDITOR");
image::set_metadata_proj_cfg(layer.img, js);
ImGui::Separator();
}
ImGui::EndGroup();
}