Merge pull request #1212 from LittleHuba/fix_1181

Fix eraser thickness not stored in settings and not reset on tool change
presentation
Ulrich Huber 7 years ago committed by GitHub
commit 9b1290824c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/control/settings/ButtonConfig.cpp
  2. 12
      src/control/settings/Settings.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)

@ -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

Loading…
Cancel
Save