Changeset View
Changeset View
Standalone View
Standalone View
mainWindow/kpMainWindow_View_Zoom.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 177 | { | |||
---|---|---|---|---|---|
179 | // not be a document or a view so we have a lot of "if (ptr)" guards. | 179 | // not be a document or a view so we have a lot of "if (ptr)" guards. | ||
180 | 180 | | |||
181 | #if DEBUG_KP_MAIN_WINDOW | 181 | #if DEBUG_KP_MAIN_WINDOW | ||
182 | qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToPre(" << zoomLevel << ")"; | 182 | qCDebug(kpLogMainWindow) << "kpMainWindow::zoomToPre(" << zoomLevel << ")"; | ||
183 | #endif | 183 | #endif | ||
184 | 184 | | |||
185 | zoomLevel = qBound (kpView::MinZoomLevel, zoomLevel, kpView::MaxZoomLevel); | 185 | zoomLevel = qBound (kpView::MinZoomLevel, zoomLevel, kpView::MaxZoomLevel); | ||
186 | 186 | | |||
187 | // mute point since the thumbnail suffers from this too | | |||
188 | #if 0 | | |||
189 | else if (d->mainView && d->mainView->zoomLevelX () % 100 == 0 && zoomLevel % 100) | | |||
190 | { | | |||
191 | if (KMessageBox::warningContinueCancel (this, | | |||
192 | i18n ("Setting the zoom level to a value that is not a multiple of 100% " | | |||
193 | "results in imprecise editing and redraw glitches.\n" | | |||
194 | "Do you really want to set to zoom level to %1%?", | | |||
195 | zoomLevel), | | |||
196 | QString()/*caption*/, | | |||
197 | i18n ("Set Zoom Level to %1%", zoomLevel), | | |||
198 | "DoNotAskAgain_ZoomLevelNotMultipleOf100") != KMessageBox::Continue) | | |||
199 | { | | |||
200 | zoomLevel = d->mainView->zoomLevelX (); | | |||
201 | } | | |||
202 | } | | |||
203 | #endif | | |||
204 | | ||||
205 | int index = 0; | 187 | int index = 0; | ||
206 | QList <int>::Iterator it = d->zoomList.begin (); | 188 | QList <int>::Iterator it = d->zoomList.begin (); | ||
207 | 189 | | |||
208 | while (index < d->zoomList.count () && zoomLevel > *it) | 190 | while (index < d->zoomList.count () && zoomLevel > *it) | ||
209 | { | 191 | { | ||
210 | it++; | 192 | it++; | ||
211 | index++; | 193 | index++; | ||
212 | } | 194 | } | ||
▲ Show 20 Lines • Show All 497 Lines • Show Last 20 Lines |