mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
Fix type picker popup cursor, sanitize string display
- Use isListActive() to detect popup and force arrow cursor - Remove broken widget-search hack from showTypeListFiltered() - Escape \n \r \t and control chars in char[]/wchar_t[] display
This commit is contained in:
@@ -1143,16 +1143,7 @@ void RcxEditor::showTypeListFiltered(const QString& filter) {
|
||||
m_sci->SendScintilla(QsciScintillaBase::SCI_AUTOCSETSEPARATOR, (long)' ');
|
||||
m_sci->SendScintilla(QsciScintillaBase::SCI_USERLISTSHOW,
|
||||
(uintptr_t)1, list.constData());
|
||||
|
||||
// Set arrow cursor on the autocomplete popup (it defaults to pointing hand)
|
||||
for (QObject* child : m_sci->children()) {
|
||||
if (auto* w = qobject_cast<QWidget*>(child)) {
|
||||
if (w->isVisible() && w->windowFlags() & Qt::Popup) {
|
||||
w->setCursor(Qt::ArrowCursor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Arrow cursor for popup is handled by applyHoverCursor() via isListActive()
|
||||
}
|
||||
|
||||
void RcxEditor::updateTypeListFilter() {
|
||||
@@ -1248,6 +1239,17 @@ void RcxEditor::applyHoverCursor() {
|
||||
return;
|
||||
}
|
||||
|
||||
// If autocomplete/user list popup is active, use arrow cursor
|
||||
if (m_sci->isListActive()) {
|
||||
if (!m_cursorOverridden) {
|
||||
QApplication::setOverrideCursor(Qt::ArrowCursor);
|
||||
m_cursorOverridden = true;
|
||||
} else {
|
||||
QApplication::changeOverrideCursor(Qt::ArrowCursor);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int line; EditTarget t;
|
||||
bool tokenHit = hitTestTarget(m_sci, m_meta, m_lastHoverPos, line, t, m_layout.nameW);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user