############################################################################## ################# setter methods and undo commands ########################## ##############################################################################
| 244 | // ################# setter methods and undo commands ########################## |
| 245 | // ############################################################################## |
| 246 | void Matrix::setRowCount(int count) { |
| 247 | Q_D(const Matrix); |
| 248 | const auto currCount = d->rowCount(); |
| 249 | if (count == currCount) |
| 250 | return; |
| 251 | |
| 252 | const int diff = count - currCount; |
| 253 | if (diff > 0) |
| 254 | appendRows(diff); |
| 255 | else if (diff < 0) |
| 256 | removeRows(currCount + diff, -diff); |
| 257 | } |
| 258 | |
| 259 | void Matrix::setColumnCount(int count) { |
| 260 | Q_D(const Matrix); |