Skip to content

Commit

Permalink
VectorGraph_deleted_VectorGraphDataArray_effectors_cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
szeli1 committed Mar 31, 2024
1 parent 947d961 commit e4c59d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/VectorGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class LMMS_EXPORT VectorGraphView : public QWidget, public ModelView

void useGetLastValues();
signals:
inline void drawn();
void drawn();
protected:
void paintEvent(QPaintEvent* pe) override; //TODO
//void dropEvent(QDropEvent* de) override; //ignore
Expand Down
8 changes: 6 additions & 2 deletions src/gui/widgets/VectorGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ void VectorGraphView::paintEvent(QPaintEvent* pe)
p.drawLine(0, 0, 0, height() - 1);


VectorGraphDataArray* dataArray = nullptr;
for (unsigned int i = 0; i < model()->getDataArraySize(); i++)
{
paintGraph(&p, i);
Expand Down Expand Up @@ -1427,8 +1426,13 @@ unsigned int VectorGraphModel::addArray()

void VectorGraphModel::delArray(unsigned int locationIn)
{
// TODO test
for (unsigned int i = locationIn; i < m_dataArrays.size() - 1; i++)
{
if (m_dataArrays[i].getEffectorArrayLocation() == locationIn)
{
m_dataArrays[i].setEffectorArrayLocation(-1);
}
m_dataArrays[i] = m_dataArrays[i + 1];
}
m_dataArrays.pop_back();
Expand Down Expand Up @@ -1690,9 +1694,9 @@ bool VectorGraphDataArray::setEffectorArrayLocation(int locationIn)
{
if (m_effectorLocation != -1)
{
m_effectorLocation = -1;
getUpdatingFromPoint(-1);
dataChanged();
m_effectorLocation = -1;
}
}
return !found;
Expand Down

0 comments on commit e4c59d7

Please sign in to comment.