mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Fix issue 367: Put alpha drawing mode isn't working
This commit is contained in:
parent
f107dd3cbc
commit
d780e90784
@ -606,6 +606,10 @@ public:
|
||||
m_inkType = (InkType)get_config_int(cfg_section.c_str(), "InkType", (int)kDefaultInk);
|
||||
m_freehandAlgorithm = kDefaultFreehandAlgorithm;
|
||||
|
||||
// Reset invalid configurations for inks.
|
||||
if (m_inkType != kDefaultInk && m_inkType != kPutAlphaInk)
|
||||
m_inkType = kDefaultInk;
|
||||
|
||||
m_pen.enableSignals(false);
|
||||
m_pen.setType((PenType)get_config_int(cfg_section.c_str(), "PenType", (int)PEN_TYPE_CIRCLE));
|
||||
m_pen.setSize(get_config_int(cfg_section.c_str(), "PenSize", m_tool->getDefaultPenSize()));
|
||||
|
@ -289,10 +289,16 @@ protected:
|
||||
void onChange() OVERRIDE {
|
||||
ComboBox::onChange();
|
||||
|
||||
InkType inkType = kDefaultInk;
|
||||
|
||||
switch (getSelectedItemIndex()) {
|
||||
case 0: inkType = kDefaultInk; break;
|
||||
case 1: inkType = kPutAlphaInk; break;
|
||||
}
|
||||
|
||||
ISettings* settings = UIContext::instance()->getSettings();
|
||||
Tool* currentTool = settings->getCurrentTool();
|
||||
settings->getToolSettings(currentTool)
|
||||
->setInkType((InkType)getSelectedItemIndex());
|
||||
settings->getToolSettings(currentTool)->setInkType(inkType);
|
||||
}
|
||||
|
||||
void onCloseListBox() OVERRIDE {
|
||||
|
Loading…
x
Reference in New Issue
Block a user