mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-12 16:14:10 +00:00
Fix ColorBar::onCanPaste() to return true when we can still paste colors
This commit is contained in:
parent
f395a0c768
commit
c1324d196e
@ -245,7 +245,12 @@ void PaletteView::discardClipboardSelection()
|
||||
redraw = true;
|
||||
}
|
||||
|
||||
if (areColorsInClipboard()) {
|
||||
if (m_clipboardEntries.picks() > 0) {
|
||||
m_clipboardEntries.clear();
|
||||
redraw = true;
|
||||
}
|
||||
|
||||
if (isMarchingAntsRunning()) {
|
||||
stopMarchingAnts();
|
||||
redraw = true;
|
||||
}
|
||||
@ -256,7 +261,7 @@ void PaletteView::discardClipboardSelection()
|
||||
|
||||
bool PaletteView::areColorsInClipboard() const
|
||||
{
|
||||
return isMarchingAntsRunning();
|
||||
return (m_clipboardEditor && m_clipboardEntries.picks());
|
||||
}
|
||||
|
||||
bool PaletteView::onProcessMessage(Message* msg)
|
||||
|
@ -36,6 +36,10 @@ namespace doc {
|
||||
const_reference operator[](int idx) const { return m_items[idx]; }
|
||||
reference operator[](int idx) { return m_items[idx]; }
|
||||
|
||||
void clear() {
|
||||
std::fill(m_items.begin(), m_items.end(), false);
|
||||
}
|
||||
|
||||
// If there is just one selected color (or none), we select them all.
|
||||
void pickAllIfNeeded() {
|
||||
if (picks() < 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user