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