@@ -512,7 +512,7 @@ void ModuleWidget::copyClipboard() { | |||||
cleanupModuleJson(moduleJ); | cleanupModuleJson(moduleJ); | ||||
DEFER({json_decref(moduleJ);}); | DEFER({json_decref(moduleJ);}); | ||||
char* json = json_dumps(moduleJ, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||||
char* json = json_dumps(moduleJ, JSON_INDENT(2)); | |||||
DEFER({std::free(json);}); | DEFER({std::free(json);}); | ||||
glfwSetClipboardString(APP->window->win, json); | glfwSetClipboardString(APP->window->win, json); | ||||
} | } | ||||
@@ -633,7 +633,7 @@ void ModuleWidget::save(std::string filename) { | |||||
} | } | ||||
DEFER({std::fclose(file);}); | DEFER({std::fclose(file);}); | ||||
json_dumpf(moduleJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||||
json_dumpf(moduleJ, file, JSON_INDENT(2)); | |||||
} | } | ||||
void ModuleWidget::saveTemplate() { | void ModuleWidget::saveTemplate() { | ||||
@@ -936,7 +936,7 @@ void RackWidget::saveSelection(std::string path) { | |||||
} | } | ||||
DEFER({std::fclose(file);}); | DEFER({std::fclose(file);}); | ||||
json_dumpf(rootJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||||
json_dumpf(rootJ, file, JSON_INDENT(2)); | |||||
} | } | ||||
void RackWidget::saveSelectionDialog() { | void RackWidget::saveSelectionDialog() { | ||||
@@ -964,7 +964,7 @@ void RackWidget::saveSelectionDialog() { | |||||
void RackWidget::copyClipboardSelection() { | void RackWidget::copyClipboardSelection() { | ||||
json_t* rootJ = selectionToJson(); | json_t* rootJ = selectionToJson(); | ||||
DEFER({json_decref(rootJ);}); | DEFER({json_decref(rootJ);}); | ||||
char* moduleJson = json_dumps(rootJ, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||||
char* moduleJson = json_dumps(rootJ, JSON_INDENT(2)); | |||||
DEFER({std::free(moduleJson);}); | DEFER({std::free(moduleJson);}); | ||||
glfwSetClipboardString(APP->window->win, moduleJson); | glfwSetClipboardString(APP->window->win, moduleJson); | ||||
} | } | ||||
@@ -203,7 +203,7 @@ void PatchManager::saveAutosave() { | |||||
return; | return; | ||||
} | } | ||||
json_dumpf(rootJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(9)); | |||||
json_dumpf(rootJ, file, JSON_INDENT(2)); | |||||
std::fclose(file); | std::fclose(file); | ||||
system::remove(patchPath); | system::remove(patchPath); | ||||
system::rename(tmpPath, patchPath); | system::rename(tmpPath, patchPath); | ||||
@@ -393,8 +393,7 @@ void save(std::string path) { | |||||
return; | return; | ||||
DEFER({std::fclose(file);}); | DEFER({std::fclose(file);}); | ||||
// 11 is enough precision to handle double UNIX time values to 0.1 seconds. | |||||
json_dumpf(rootJ, file, JSON_INDENT(2) | JSON_REAL_PRECISION(11)); | |||||
json_dumpf(rootJ, file, JSON_INDENT(2)); | |||||
json_decref(rootJ); | json_decref(rootJ); | ||||
} | } | ||||