From 1177ac9309a41bddfbdf8194864add024ed0a21d Mon Sep 17 00:00:00 2001 From: Ulrich Huber Date: Tue, 4 Jun 2019 21:47:20 +0200 Subject: [PATCH 1/2] Fix buttonConfig not updating tool size --- src/control/settings/ButtonConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control/settings/ButtonConfig.cpp b/src/control/settings/ButtonConfig.cpp index 1cd42a90..5beb1212 100644 --- a/src/control/settings/ButtonConfig.cpp +++ b/src/control/settings/ButtonConfig.cpp @@ -51,7 +51,7 @@ void ButtonConfig::acceptActions(ToolHandler* toolHandler) toolHandler->selectTool(this->action, false); - if (this->action == TOOL_PEN || this->action == TOOL_HILIGHTER) + if (this->action == TOOL_PEN || this->action == TOOL_HILIGHTER || this->action == TOOL_ERASER) { if (this->drawingType != DRAWING_TYPE_DONT_CHANGE) From 0d818bac7998f067ad2b01b5976b368e95814ab2 Mon Sep 17 00:00:00 2001 From: Ulrich Huber Date: Tue, 4 Jun 2019 21:53:19 +0200 Subject: [PATCH 2/2] Fix Settings not storing thickness of eraser --- src/control/settings/Settings.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/control/settings/Settings.cpp b/src/control/settings/Settings.cpp index b4b47fbf..55c55a07 100644 --- a/src/control/settings/Settings.cpp +++ b/src/control/settings/Settings.cpp @@ -677,6 +677,17 @@ void Settings::loadButtonConfig() // If not specified: do not change cfg->eraserMode = ERASER_TYPE_NONE; } + + string sSize; + if (e.getString("size", sSize)) + { + cfg->size = toolSizeFromString(sSize); + } + else + { + // If not specified: do not change + cfg->size = TOOL_SIZE_NONE; + } } // Touch device @@ -828,6 +839,7 @@ void Settings::saveButtonConfig() if (type == TOOL_ERASER) { e.setString("eraserMode", eraserTypeToString(cfg->eraserMode)); + e.setString("size", toolSizeToString(cfg->size)); } // Touch device