Commit cda1fd56 authored by Blackbeard (alberto flores)'s avatar Blackbeard (alberto flores) 🚢

Use chooseNextBrush to update the Index

parent e8248790
......@@ -64,8 +64,6 @@ public:
void renderImage(int width, int weight);
private:
......
......@@ -49,14 +49,17 @@ public:
}
int chooseNextBrush(const KisPaintInformation& info) override {
Q_UNUSED(info)
return 0;
m_currentIndex = m_parasite.index();
qDebug() << "dab" << m_currentIndex;
m_parasite.nextIndex();
return m_currentIndex;
}
void updateBrushIndexes(const KisPaintInformation& info, int seqNo) override {
Q_UNUSED(info)
Q_UNUSED(seqNo)
qDebug() << "dab";
m_parasite.nextIndex();
m_currentIndex = m_parasite.index();
// m_parasite.nextIndex();
// m_currentIndex = m_parasite.index();
// qDebug() << "dab" << m_currentIndex;
}
void notifyStrokeStarted() override {
qDebug() << "stroke";
......@@ -258,6 +261,12 @@ void KisVectorAnimatedBrush::newbrushTip()
}
quint32 KisVectorAnimatedBrush::brushIndex(const KisPaintInformation& info) const
{
return m_d->brushesPipe.brushIndex(info);
}
/*
QImage KisVectorAnimatedBrush::brushTipImage() const
{
......
......@@ -58,6 +58,7 @@ public:
// void notifyCachedDabPainted(const KisPaintInformation& info) override;
void prepareForSeqNo(const KisPaintInformation& info, int seqNo) override;
quint32 brushIndex(const KisPaintInformation& info) const override;
// QImage brushTipImage() const override;
......
......@@ -147,7 +147,7 @@ int KisVectorBrushParasite::maxIndex()
void KisVectorBrushParasite::nextIndex()
{
qDebug() << "index" << m_index;
// qDebug() << "index" << m_index;
if (m_index == m_maxIndex){
m_index = 0;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment