! * called when the layout was changed in Worksheet, * enables the corresponding action */
| 2352 | * enables the corresponding action |
| 2353 | */ |
| 2354 | void WorksheetView::layoutChanged(Worksheet::Layout layout) { |
| 2355 | if (layout == Worksheet::Layout::NoLayout) { |
| 2356 | verticalLayoutAction->setEnabled(true); |
| 2357 | verticalLayoutAction->setChecked(false); |
| 2358 | |
| 2359 | horizontalLayoutAction->setEnabled(true); |
| 2360 | horizontalLayoutAction->setChecked(false); |
| 2361 | |
| 2362 | gridLayoutAction->setEnabled(true); |
| 2363 | gridLayoutAction->setChecked(false); |
| 2364 | |
| 2365 | breakLayoutAction->setEnabled(false); |
| 2366 | } else { |
| 2367 | verticalLayoutAction->setEnabled(false); |
| 2368 | horizontalLayoutAction->setEnabled(false); |
| 2369 | gridLayoutAction->setEnabled(false); |
| 2370 | breakLayoutAction->setEnabled(true); |
| 2371 | |
| 2372 | if (layout == Worksheet::Layout::VerticalLayout) |
| 2373 | verticalLayoutAction->setChecked(true); |
| 2374 | else if (layout == Worksheet::Layout::HorizontalLayout) |
| 2375 | horizontalLayoutAction->setChecked(true); |
| 2376 | else |
| 2377 | gridLayoutAction->setChecked(true); |
| 2378 | } |
| 2379 | } |
| 2380 | |
| 2381 | void WorksheetView::suppressSelectionChangedEvent(bool value) { |
| 2382 | m_suppressSelectionChangedEvent = value; |