disableTouchForDrawing is now saved

This commit is contained in:
Yousef Khadadeh 2026-09-08 19:48:06 +03:00
parent 0efcfe0b27
commit e18d12cf26

View file

@ -68,6 +68,7 @@ nlohmann::json GlobalConfig::get_config_json(const InputManager& input) const {
toRet["defaultCanvasBackgroundColor"] = defaultCanvasBackgroundColor; toRet["defaultCanvasBackgroundColor"] = defaultCanvasBackgroundColor;
toRet["flipZoomToolDirection"] = flipZoomToolDirection; toRet["flipZoomToolDirection"] = flipZoomToolDirection;
toRet["realTimeEraser"] = realTimeEraser; toRet["realTimeEraser"] = realTimeEraser;
toRet["disableTouchForDrawing"] = disableTouchForDrawing;
#ifndef __EMSCRIPTEN__ #ifndef __EMSCRIPTEN__
toRet["checkForUpdates"] = checkForUpdates; toRet["checkForUpdates"] = checkForUpdates;
#endif #endif
@ -127,6 +128,7 @@ void GlobalConfig::set_config_json(InputManager& input, const nlohmann::json& j,
try{j.at("scrollZoomSpeed").get_to(scrollZoomSpeed);} catch(...) {} try{j.at("scrollZoomSpeed").get_to(scrollZoomSpeed);} catch(...) {}
try{j.at("mainCallbackRate").get_to(mainCallbackRate);} catch(...) {} try{j.at("mainCallbackRate").get_to(mainCallbackRate);} catch(...) {}
try{j.at("mainCallbackRateBackground").get_to(mainCallbackRateBackground);} catch(...) {} try{j.at("mainCallbackRateBackground").get_to(mainCallbackRateBackground);} catch(...) {}
try{j.at("disableTouchForDrawing").get_to(disableTouchForDrawing);} catch(...) {}
if(version >= VersionNumber(0, 6, 0)) if(version >= VersionNumber(0, 6, 0))
try{j.at("vsync").get_to(vsyncValue);} catch(...) {} try{j.at("vsync").get_to(vsyncValue);} catch(...) {}
#ifdef ADD_PREFER_X11_OPTION #ifdef ADD_PREFER_X11_OPTION