This is an automated email from the git hooks/post-receive script. thansen pushed a commit to branch master in repository aseprite.
commit 1c984696c1f96acefd5ffbc9859f0b737991d889 Author: David Capello <davidcape...@gmail.com> Date: Fri Jul 1 16:24:29 2016 -0300 Select active color bar selection when we change to shading ink --- src/app/ui/context_bar.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp index ec2e106..465094a 100644 --- a/src/app/ui/context_bar.cpp +++ b/src/app/ui/context_bar.cpp @@ -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(); } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits