add visual aid to Shader Editor search entry

This commit is contained in:
Garux 2023-08-21 17:35:31 +06:00
parent 11c0cc3fa8
commit 4209416731

View File

@ -1572,6 +1572,7 @@ class QLineEdit_search : public QLineEdit
QPlainTextEdit& m_textEdit;
public:
QLineEdit_search( QPlainTextEdit& textEdit ) : m_textEdit( textEdit ){
setPlaceholderText( QString::fromUtf8( u8"🔍" ) );
QObject::connect( this, &QLineEdit::textEdited, [this]( const QString &text ){
// when typing, we do not want jumping to next occurence on each letter input, set cursor to selection start
if( auto cursor = m_textEdit.textCursor(); cursor.hasSelection() ){