MCPcopy Create free account
hub / github.com/KDE/labplot / insertEmptyRows

Method insertEmptyRows

src/frontend/matrix/MatrixView.cpp:965–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965void MatrixView::insertEmptyRows() {
966 int first = firstSelectedRow();
967 int last = lastSelectedRow();
968 int current = first;
969
970 if (first < 0)
971 return;
972
973 WAIT_CURSOR;
974 m_matrix->beginMacro(i18n("%1: insert empty rows(s)", m_matrix->name()));
975 while (current <= last) {
976 current = first + 1;
977 while (current <= last && isRowSelected(current))
978 current++;
979 const int count = current - first;
980 m_matrix->insertRows(first, count);
981 current += count;
982 last += count;
983 while (current <= last && !isRowSelected(current))
984 current++;
985 first = current;
986 }
987 m_matrix->endMacro();
988 RESET_CURSOR;
989}
990
991void MatrixView::removeSelectedRows() {
992 int first = firstSelectedRow();

Callers

nothing calls this directly

Calls 4

beginMacroMethod · 0.80
endMacroMethod · 0.80
nameMethod · 0.45
insertRowsMethod · 0.45

Tested by

no test coverage detected