mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-03 21:46:20 +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* section() const { return m_section->name(); }
|
||||||
const char* id() const { return m_id; }
|
const char* id() const { return m_id; }
|
||||||
const T& defaultValue() const { return m_default; }
|
const T& defaultValue() const { return m_default; }
|
||||||
|
void setDefaultValue(const T& defValue) {
|
||||||
|
m_default = defValue;
|
||||||
|
}
|
||||||
|
|
||||||
bool isDirty() const { return m_dirty; }
|
bool isDirty() const { return m_dirty; }
|
||||||
void forceDirtyFlag() { m_dirty = true; }
|
void forceDirtyFlag() { m_dirty = true; }
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "app/ini_file.h"
|
#include "app/ini_file.h"
|
||||||
#include "app/pref/preferences.h"
|
#include "app/pref/preferences.h"
|
||||||
#include "app/resource_finder.h"
|
#include "app/resource_finder.h"
|
||||||
|
#include "app/tools/ink.h"
|
||||||
#include "app/tools/tool.h"
|
#include "app/tools/tool.h"
|
||||||
|
|
||||||
namespace app {
|
namespace app {
|
||||||
@ -78,6 +79,13 @@ ToolPreferences& Preferences::tool(tools::Tool* tool)
|
|||||||
else {
|
else {
|
||||||
std::string section = std::string("tool.") + tool->getId();
|
std::string section = std::string("tool.") + tool->getId();
|
||||||
ToolPreferences* toolPref = new ToolPreferences(section);
|
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;
|
m_tools[tool->getId()] = toolPref;
|
||||||
toolPref->load();
|
toolPref->load();
|
||||||
return *toolPref;
|
return *toolPref;
|
||||||
|
Loading…
Reference in New Issue
Block a user