mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-29 09:23:32 +00:00
Set default brush size for eraser/blur/jumble to 8px
This commit is contained in:
parent
9d84089b0c
commit
8a3434586e
@ -45,6 +45,9 @@ namespace app {
|
||||
const char* section() const { return m_section->name(); }
|
||||
const char* id() const { return m_id; }
|
||||
const T& defaultValue() const { return m_default; }
|
||||
void setDefaultValue(const T& defValue) {
|
||||
m_default = defValue;
|
||||
}
|
||||
|
||||
bool isDirty() const { return m_dirty; }
|
||||
void forceDirtyFlag() { m_dirty = true; }
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "app/ini_file.h"
|
||||
#include "app/pref/preferences.h"
|
||||
#include "app/resource_finder.h"
|
||||
#include "app/tools/ink.h"
|
||||
#include "app/tools/tool.h"
|
||||
|
||||
namespace app {
|
||||
@ -78,6 +79,13 @@ ToolPreferences& Preferences::tool(tools::Tool* tool)
|
||||
else {
|
||||
std::string section = std::string("tool.") + tool->getId();
|
||||
ToolPreferences* toolPref = new ToolPreferences(section);
|
||||
|
||||
// Default size for eraser, blur, etc.
|
||||
if (tool->getInk(0)->isEraser() ||
|
||||
tool->getInk(0)->isEffect()) {
|
||||
toolPref->brush.size.setDefaultValue(8);
|
||||
}
|
||||
|
||||
m_tools[tool->getId()] = toolPref;
|
||||
toolPref->load();
|
||||
return *toolPref;
|
||||
|
Loading…
Reference in New Issue
Block a user