Changeset View
Changeset View
Standalone View
Standalone View
src/vimode/modes/modebase.cpp
Show First 20 Lines • Show All 1258 Lines • ▼ Show 20 Line(s) | 1258 | if (visible_views.at(i) == m_view) { | |||
---|---|---|---|---|---|
1259 | if (i != visible_views.count() - 1) { | 1259 | if (i != visible_views.count() - 1) { | ||
1260 | bestview = visible_views.at(i + 1); | 1260 | bestview = visible_views.at(i + 1); | ||
1261 | } else { | 1261 | } else { | ||
1262 | bestview = visible_views.at(0); | 1262 | bestview = visible_views.at(0); | ||
1263 | } | 1263 | } | ||
1264 | } | 1264 | } | ||
1265 | } | 1265 | } | ||
1266 | } else { | 1266 | } else { | ||
1267 | foreach (KTextEditor::ViewPrivate *view, visible_views) { | 1267 | for (KTextEditor::ViewPrivate *view : qAsConst(visible_views)) { | ||
1268 | QPoint point = view->mapToGlobal(view->pos()); | 1268 | QPoint point = view->mapToGlobal(view->pos()); | ||
1269 | int x1 = point.x(); | 1269 | int x1 = point.x(); | ||
1270 | int x2 = point.x() + view->width(); | 1270 | int x2 = point.x() + view->width(); | ||
1271 | int y1 = point.y(); | 1271 | int y1 = point.y(); | ||
1272 | int y2 = point.y() + m_view->height(); | 1272 | int y2 = point.y() + m_view->height(); | ||
1273 | int center_y = (y1 + y2) / 2; | 1273 | int center_y = (y1 + y2) / 2; | ||
1274 | int center_x = (x1 + x2) / 2; | 1274 | int center_x = (x1 + x2) / 2; | ||
1275 | 1275 | | |||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |