| 240 | } |
| 241 | |
| 242 | void SymbolRenderWidget::adjustLayout() |
| 243 | { |
| 244 | auto old_icon_size = icon_size; |
| 245 | icon_size = Settings::getInstance().getSymbolWidgetIconSizePx() + 1; |
| 246 | // Allow symbol widget to be that much wider than the viewport |
| 247 | int overflow = icon_size / 3; |
| 248 | icons_per_row = qMax(1, (width() + overflow) / icon_size); |
| 249 | num_rows = qMax(1, (map->getNumSymbols() + icons_per_row -1) / icons_per_row); |
| 250 | setFixedHeight(num_rows * icon_size); |
| 251 | |
| 252 | if (old_icon_size != icon_size) |
| 253 | { |
| 254 | hidden_symbol_decoration.reset(new HiddenSymbolDecorator(icon_size)); |
| 255 | protected_symbol_decoration.reset(new ProtectedSymbolDecorator(icon_size)); |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | void SymbolRenderWidget::emitGuarded_selectedSymbolsChanged() |
| 260 | { |
nothing calls this directly
no test coverage detected