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

Method insertEmptyColumns

src/frontend/matrix/MatrixView.cpp:906–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906void MatrixView::insertEmptyColumns() {
907 int first = firstSelectedColumn();
908 int last = lastSelectedColumn();
909 if (first < 0)
910 return;
911 int current = first;
912
913 WAIT_CURSOR;
914 m_matrix->beginMacro(i18n("%1: insert empty column(s)", m_matrix->name()));
915 while (current <= last) {
916 current = first + 1;
917 while (current <= last && isColumnSelected(current))
918 current++;
919 const int count = current - first;
920 m_matrix->insertColumns(first, count);
921 current += count;
922 last += count;
923 while (current <= last && isColumnSelected(current))
924 current++;
925 first = current;
926 }
927 m_matrix->endMacro();
928 RESET_CURSOR;
929}
930
931void MatrixView::removeSelectedColumns() {
932 int first = firstSelectedColumn();

Callers

nothing calls this directly

Calls 4

beginMacroMethod · 0.80
endMacroMethod · 0.80
nameMethod · 0.45
insertColumnsMethod · 0.45

Tested by

no test coverage detected