Update context bar controls correctly when a new brush type is selected from a brush slot

This commit is contained in:
David Capello 2015-12-17 15:21:44 -03:00
parent 7a553f5c98
commit a3e77a657a

View File

@ -1627,8 +1627,6 @@ void ContextBar::setActiveBrushBySlot(int slot)
setActiveBrush(brush.brush());
}
else {
setActiveBrush(ContextBar::createBrushFromPreferences());
if (brush.hasFlag(BrushSlot::Flags::BrushType))
brushPref.type(static_cast<app::gen::BrushType>(brush.brush()->type()));
@ -1637,6 +1635,8 @@ void ContextBar::setActiveBrushBySlot(int slot)
if (brush.hasFlag(BrushSlot::Flags::BrushAngle))
brushPref.angle(brush.brush()->angle());
setActiveBrush(ContextBar::createBrushFromPreferences());
}
}