"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/backend/spreadsheet/SpreadsheetModel.cpp" between
labplot-2.8.1.tar.gz and labplot-2.8.2.tar.gz

About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.

SpreadsheetModel.cpp  (labplot-2.8.1):SpreadsheetModel.cpp  (labplot-2.8.2)
skipping to change at line 394 skipping to change at line 394
int i = m_spreadsheet->indexOfChild<Column>(col); int i = m_spreadsheet->indexOfChild<Column>(col);
emit dataChanged(index(0, i), index(m_rowCount-1, i)); emit dataChanged(index(0, i), index(m_rowCount-1, i));
} }
void SpreadsheetModel::handleRowsInserted(const AbstractColumn* col, int before, int count) { void SpreadsheetModel::handleRowsInserted(const AbstractColumn* col, int before, int count) {
if (m_suppressSignals) if (m_suppressSignals)
return; return;
Q_UNUSED(before) Q_UNUSED(count) Q_UNUSED(before) Q_UNUSED(count)
updateVerticalHeader();
int i = m_spreadsheet->indexOfChild<Column>(col); int i = m_spreadsheet->indexOfChild<Column>(col);
m_rowCount = col->rowCount(); m_rowCount = col->rowCount();
emit dataChanged(index(0, i), index(m_rowCount-1, i)); emit dataChanged(index(0, i), index(m_rowCount-1, i));
updateVerticalHeader();
m_spreadsheet->emitRowCountChanged(); m_spreadsheet->emitRowCountChanged();
} }
void SpreadsheetModel::handleRowsRemoved(const AbstractColumn* col, int first, i nt count) { void SpreadsheetModel::handleRowsRemoved(const AbstractColumn* col, int first, i nt count) {
if (m_suppressSignals) if (m_suppressSignals)
return; return;
Q_UNUSED(first) Q_UNUSED(count) Q_UNUSED(first) Q_UNUSED(count)
updateVerticalHeader();
int i = m_spreadsheet->indexOfChild<Column>(col); int i = m_spreadsheet->indexOfChild<Column>(col);
m_rowCount = col->rowCount(); m_rowCount = col->rowCount();
emit dataChanged(index(0, i), index(m_rowCount-1, i)); emit dataChanged(index(0, i), index(m_rowCount-1, i));
updateVerticalHeader();
m_spreadsheet->emitRowCountChanged(); m_spreadsheet->emitRowCountChanged();
} }
void SpreadsheetModel::updateVerticalHeader() { void SpreadsheetModel::updateVerticalHeader() {
int old_rows = m_vertical_header_data.size(); int old_rows = m_vertical_header_data.size();
int new_rows = m_rowCount; int new_rows = m_rowCount;
if (new_rows > old_rows) { if (new_rows > old_rows) {
beginInsertRows(QModelIndex(), old_rows, new_rows-1); beginInsertRows(QModelIndex(), old_rows, new_rows-1);
 End of changes. 4 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)