mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-03 21:46:20 +00:00
Restore brush pattern correctly from user preferences
This commit is contained in:
parent
a2d9f3fc76
commit
6f72666330
@ -271,10 +271,17 @@ private:
|
|||||||
|
|
||||||
class ContextBar::BrushPatternField : public ComboBox {
|
class ContextBar::BrushPatternField : public ComboBox {
|
||||||
public:
|
public:
|
||||||
BrushPatternField() : m_lock(false) {
|
BrushPatternField() {
|
||||||
|
// We use "m_lock" variable to avoid setting the pattern
|
||||||
|
// brush when we call ComboBox::addItem() (because the first
|
||||||
|
// addItem() generates an onChange() event).
|
||||||
|
m_lock = true;
|
||||||
addItem("Pattern aligned to source");
|
addItem("Pattern aligned to source");
|
||||||
addItem("Pattern aligned to destination");
|
addItem("Pattern aligned to destination");
|
||||||
addItem("Paint brush");
|
addItem("Paint brush");
|
||||||
|
m_lock = false;
|
||||||
|
|
||||||
|
setSelectedItemIndex((int)Preferences::instance().brush.pattern());
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBrushPattern(BrushPattern type) {
|
void setBrushPattern(BrushPattern type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user