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

Method unmaskSelection

src/frontend/spreadsheet/SpreadsheetView.cpp:2081–2108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2079}
2080
2081void SpreadsheetView::unmaskSelection() {
2082 int first = firstSelectedRow();
2083 if (first < 0)
2084 return;
2085 int last = lastSelectedRow();
2086
2087 WAIT_CURSOR;
2088 m_spreadsheet->beginMacro(i18n("%1: unmask selected cells", m_spreadsheet->name()));
2089
2090 // suppress the data changed signal in all selected columns, will be emitted once per column at the end
2091 const auto& columns = selectedColumns(false);
2092 for (auto* column : columns)
2093 column->setSuppressDataChangedSignal(true);
2094
2095 // unmask the selected cells
2096 for (auto* column : columns) {
2097 int col = m_spreadsheet->indexOfChild<Column>(column);
2098 for (int row = first; row <= last; row++)
2099 if (isCellSelected(row, col))
2100 column->setMasked(row, false);
2101
2102 column->setSuppressDataChangedSignal(false);
2103 column->setChanged();
2104 }
2105
2106 m_spreadsheet->endMacro();
2107 RESET_CURSOR;
2108}
2109
2110void SpreadsheetView::reverseSelection() {
2111 auto* selectionModel = m_tableView->selectionModel();

Callers

nothing calls this directly

Calls 6

beginMacroMethod · 0.80
setMaskedMethod · 0.80
endMacroMethod · 0.80
nameMethod · 0.45
setChangedMethod · 0.45

Tested by

no test coverage detected