mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 10:13:35 +00:00
Select active color bar selection when we change to shading ink
This commit is contained in:
parent
ec15ec7bb2
commit
1c984696c1
@ -465,6 +465,17 @@ class ContextBar::InkShadesField : public HBox {
|
||||
parent()->parent()->layout();
|
||||
}
|
||||
|
||||
void updateShadeFromColorBarPicks() {
|
||||
auto colorBar = ColorBar::instance();
|
||||
if (!colorBar)
|
||||
return;
|
||||
|
||||
doc::PalettePicks picks;
|
||||
colorBar->getPaletteView()->getSelectedEntries(picks);
|
||||
if (picks.picks() >= 2)
|
||||
onChangeColorBarSelection();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void onChangeColorBarSelection() {
|
||||
@ -710,6 +721,10 @@ public:
|
||||
m_shade.setShade(shade);
|
||||
}
|
||||
|
||||
void updateShadeFromColorBarPicks() {
|
||||
m_shade.updateShadeFromColorBarPicks();
|
||||
}
|
||||
|
||||
private:
|
||||
void onShowMenu() {
|
||||
loadShades();
|
||||
@ -1553,6 +1568,8 @@ void ContextBar::updateForTool(tools::Tool* tool)
|
||||
m_spraySpeed->setValue(toolPref->spray.speed());
|
||||
}
|
||||
|
||||
bool updateShade = (!m_inkShades->isVisible() && hasInkShades);
|
||||
|
||||
m_eyedropperField->updateFromPreferences(preferences.eyedropper);
|
||||
m_autoSelectLayer->setSelected(preferences.editor.autoSelectLayer());
|
||||
|
||||
@ -1631,6 +1648,10 @@ void ContextBar::updateForTool(tools::Tool* tool)
|
||||
(isPaint || isEffect || hasSelectOptions));
|
||||
m_symmetry->updateWithCurrentDocument();
|
||||
|
||||
// Update ink shades with the current selected palette entries
|
||||
if (updateShade)
|
||||
m_inkShades->updateShadeFromColorBarPicks();
|
||||
|
||||
layout();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user