Spreadsheet: Removed setPosition() function.
This commit is contained in:
@@ -98,7 +98,6 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi
|
||||
|
||||
columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, _1, _2));
|
||||
rowHeightChangedConnection = sheet->rowHeightChanged.connect(bind(&SheetView::resizeRow, this, _1, _2));
|
||||
positionChangedConnection = sheet->positionChanged.connect(bind(&SheetView::setPosition, this, _1));
|
||||
|
||||
QPalette palette = ui->cells->palette();
|
||||
palette.setColor(QPalette::Base, QColor(255, 255, 255));
|
||||
@@ -263,17 +262,6 @@ void SheetView::resizeColumn(int col, int newSize)
|
||||
ui->cells->setColumnWidth(col, newSize);
|
||||
}
|
||||
|
||||
void SheetView::setPosition(CellAddress address)
|
||||
{
|
||||
QModelIndex curr = ui->cells->currentIndex();
|
||||
QModelIndex i = ui->cells->model()->index(address.row(), address.col());
|
||||
|
||||
if (i.isValid() && (curr.row() != address.row() || curr.column() != address.col())) {
|
||||
ui->cells->clearSelection();
|
||||
ui->cells->setCurrentIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::resizeRow(int col, int newSize)
|
||||
{
|
||||
if (ui->cells->verticalHeader()->sectionSize(col) != newSize)
|
||||
@@ -299,7 +287,6 @@ void SheetView::editingFinished()
|
||||
void SheetView::currentChanged ( const QModelIndex & current, const QModelIndex & previous )
|
||||
{
|
||||
updateContentLine();
|
||||
sheet->setPosition(CellAddress(current.row(), current.column()));
|
||||
}
|
||||
|
||||
void SheetView::updateCell(const App::Property *prop)
|
||||
|
||||
Reference in New Issue
Block a user