Made anchors list static const
parent
0cc40ebe1c
commit
f340a436d3
|
@ -1099,15 +1099,20 @@ void MainWindow::on_figure_geometry_apply_clicked()
|
||||||
void MainWindow::on_button_deleteFigure_clicked()
|
void MainWindow::on_button_deleteFigure_clicked()
|
||||||
{
|
{
|
||||||
QModelIndexList indexes;
|
QModelIndexList indexes;
|
||||||
while((indexes = ui->figures_list->selectionModel()->selectedIndexes()).size()) {
|
while ((indexes = ui->figures_list->selectionModel()->selectedIndexes()).size()) {
|
||||||
drawMapFigureTable->removeRow(indexes.first().row());
|
drawMapFigureTable->removeRow(indexes.first().row());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_figureSelect_currentIndexChanged(int index)
|
void MainWindow::on_figureSelect_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
QStringList lookup = QStringList()<<"figure"
|
static const QStringList anchors = QStringList() << "figure"
|
||||||
<< "drawmaparrow" << "drawmapcircle" << "drawmapellipse"
|
<< "drawmaparrow"
|
||||||
<< "drawmapline" << "drawmappoint" << "drawmaprectangle" << "drawmaptext";
|
<< "drawmapcircle"
|
||||||
ui->figureInformation->scrollToAnchor(lookup.at(index));
|
<< "drawmapellipse"
|
||||||
|
<< "drawmapline"
|
||||||
|
<< "drawmappoint"
|
||||||
|
<< "drawmaprectangle"
|
||||||
|
<< "drawmaptext";
|
||||||
|
ui->figureInformation->scrollToAnchor(anchors.at(index));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue