Changeset View
Changeset View
Standalone View
Standalone View
src/ksaneviewer.cpp
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 162 | { | |||
---|---|---|---|---|---|
163 | if (img == nullptr) { | 163 | if (img == nullptr) { | ||
164 | return; | 164 | return; | ||
165 | } | 165 | } | ||
166 | 166 | | |||
167 | // remove selections | 167 | // remove selections | ||
168 | clearSelections(); | 168 | clearSelections(); | ||
169 | 169 | | |||
170 | // clear zoom | 170 | // clear zoom | ||
171 | setMatrix(QMatrix()); | 171 | resetTransform(); | ||
172 | 172 | | |||
173 | const auto dpr = img->devicePixelRatio(); | 173 | const auto dpr = img->devicePixelRatio(); | ||
174 | d->scene->setSceneRect(0, 0, img->width() / dpr, img->height() / dpr); | 174 | d->scene->setSceneRect(0, 0, img->width() / dpr, img->height() / dpr); | ||
175 | d->selection->setMaxRight(img->width()); | 175 | d->selection->setMaxRight(img->width()); | ||
176 | d->selection->setMaxBottom(img->height()); | 176 | d->selection->setMaxBottom(img->height()); | ||
177 | 177 | | |||
178 | d->selection->setDevicePixelRatio(dpr); | 178 | d->selection->setDevicePixelRatio(dpr); | ||
179 | d->hideTop->setDevicePixelRatio(dpr); | 179 | d->hideTop->setDevicePixelRatio(dpr); | ||
▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines |