Changeset View
Changeset View
Standalone View
Standalone View
src/ViewSplitter.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 129 | { | |||
---|---|---|---|---|---|
142 | 142 | | |||
143 | const int newY = orientation != Qt::Vertical ? startMapped.y() + handleWidth | 143 | const int newY = orientation != Qt::Vertical ? startMapped.y() + handleWidth | ||
144 | : direction == 1 ? startMapped.y() + terminalDisplay->height() + handleWidth | 144 | : direction == 1 ? startMapped.y() + terminalDisplay->height() + handleWidth | ||
145 | : startMapped.y() - handleWidth; | 145 | : startMapped.y() - handleWidth; | ||
146 | 146 | | |||
147 | const auto newPoint = QPoint(newX, newY); | 147 | const auto newPoint = QPoint(newX, newY); | ||
148 | auto child = topSplitter->childAt(newPoint); | 148 | auto child = topSplitter->childAt(newPoint); | ||
149 | 149 | | |||
150 | qDebug() << "Handling focus"; | | |||
151 | if (TerminalDisplay* terminal = qobject_cast<TerminalDisplay*>(child)) { | 150 | if (TerminalDisplay* terminal = qobject_cast<TerminalDisplay*>(child)) { | ||
152 | terminal->setFocus(Qt::OtherFocusReason); | 151 | terminal->setFocus(Qt::OtherFocusReason); | ||
153 | } else if (qobject_cast<QScrollBar*>(child)) { | 152 | } else if (qobject_cast<QScrollBar*>(child)) { | ||
154 | auto terminal = qobject_cast<TerminalDisplay*>(child->parent()); | 153 | auto terminal = qobject_cast<TerminalDisplay*>(child->parent()); | ||
155 | terminal->setFocus(Qt::OtherFocusReason); | 154 | terminal->setFocus(Qt::OtherFocusReason); | ||
156 | } else if (qobject_cast<QSplitterHandle*>(child)) { | 155 | } else if (qobject_cast<QSplitterHandle*>(child)) { | ||
157 | auto targetSplitter = qobject_cast<QSplitter*>(child->parent()); | 156 | auto targetSplitter = qobject_cast<QSplitter*>(child->parent()); | ||
158 | auto terminal = qobject_cast<TerminalDisplay*>(targetSplitter->widget(0)); | 157 | auto terminal = qobject_cast<TerminalDisplay*>(targetSplitter->widget(0)); | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |