| 7962 | } |
| 7963 | |
| 7964 | void MainWindow::toggleAutoLayout() { |
| 7965 | DocumentViewport* viewport = currentViewport(); |
| 7966 | if (!viewport) return; |
| 7967 | |
| 7968 | Document* doc = viewport->document(); |
| 7969 | if (!doc || doc->isEdgeless()) { |
| 7970 | // Auto layout only applies to paged documents |
| 7971 | #ifdef SPEEDYNOTE_DEBUG |
| 7972 | qDebug() << "Auto layout not available for edgeless canvas"; |
| 7973 | #endif |
| 7974 | return; |
| 7975 | } |
| 7976 | |
| 7977 | bool newState = !viewport->autoLayoutEnabled(); |
| 7978 | viewport->setAutoLayoutEnabled(newState); |
| 7979 | |
| 7980 | // Show status feedback via debug console |
| 7981 | #ifdef SPEEDYNOTE_DEBUG |
| 7982 | if (newState) { |
| 7983 | qDebug() << "Auto layout enabled (1/2 columns)"; |
| 7984 | } else { |
| 7985 | qDebug() << "Single column layout"; |
| 7986 | } |
| 7987 | #endif |
| 7988 | } |
| 7989 | |
| 7990 | // REMOVED MW7.4: onBookmarkItemClicked function removed - bookmark implementation deleted |
| 7991 |
no test coverage detected