| 658 | |
| 659 | #ifdef BUILD_DESIGNER |
| 660 | void MainWindow::OnBuildStyle() |
| 661 | { |
| 662 | try |
| 663 | { |
| 664 | build_style::BuildAndApply(m_mapcssFilePath); |
| 665 | m_pDrawWidget->RefreshDrawingRules(); |
| 666 | |
| 667 | bool enabled; |
| 668 | if (!settings::Get(kEnabledAutoRegenGeomIndex, enabled)) |
| 669 | enabled = false; |
| 670 | |
| 671 | if (enabled) |
| 672 | { |
| 673 | build_style::NeedRecalculate = true; |
| 674 | QMainWindow::close(); |
| 675 | } |
| 676 | } |
| 677 | catch (std::exception & e) |
| 678 | { |
| 679 | QMessageBox msgBox; |
| 680 | msgBox.setWindowTitle("Error"); |
| 681 | msgBox.setText(e.what()); |
| 682 | msgBox.setStandardButtons(QMessageBox::Ok); |
| 683 | msgBox.setDefaultButton(QMessageBox::Ok); |
| 684 | msgBox.exec(); |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | void MainWindow::OnRecalculateGeomIndex() |
| 689 | { |
nothing calls this directly
no test coverage detected