Changeset View
Changeset View
Standalone View
Standalone View
lib/documentview/documentviewcontainer.cpp
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | |||||
171 | } | 171 | } | ||
172 | 172 | | |||
173 | void DocumentViewContainer::updateLayout() | 173 | void DocumentViewContainer::updateLayout() | ||
174 | { | 174 | { | ||
175 | // Stop update timer: this is useful if updateLayout() is called directly | 175 | // Stop update timer: this is useful if updateLayout() is called directly | ||
176 | // and not through scheduleLayoutUpdate() | 176 | // and not through scheduleLayoutUpdate() | ||
177 | d->mLayoutUpdateTimer->stop(); | 177 | d->mLayoutUpdateTimer->stop(); | ||
178 | QList<DocumentView*> views = (d->mViews | d->mAddedViews).toList(); | 178 | QList<DocumentView*> views = (d->mViews | d->mAddedViews).toList(); | ||
179 | qSort(views.begin(), views.end(), viewLessThan); | 179 | std::sort(views.begin(), views.end(), viewLessThan); | ||
180 | 180 | | |||
181 | bool animated = GwenviewConfig::animationMethod() != DocumentView::NoAnimation; | 181 | bool animated = GwenviewConfig::animationMethod() != DocumentView::NoAnimation; | ||
182 | bool crossFade = d->mAddedViews.count() == 1 && d->mRemovedViews.count() == 1; | 182 | bool crossFade = d->mAddedViews.count() == 1 && d->mRemovedViews.count() == 1; | ||
183 | 183 | | |||
184 | if (animated && crossFade) { | 184 | if (animated && crossFade) { | ||
185 | DocumentView* oldView = *d->mRemovedViews.begin(); | 185 | DocumentView* oldView = *d->mRemovedViews.begin(); | ||
186 | DocumentView* newView = *d->mAddedViews.begin(); | 186 | DocumentView* newView = *d->mAddedViews.begin(); | ||
187 | 187 | | |||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |