mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-26 16:17:57 +03:00
Fix double click selection on locked documents.
Fix UITextEdit multi-line rendering + Fix DocumentView::isLineVisible. Fix AutoClose brackets being applied even when was not enabled (ex. UITextInput).
This commit is contained in:
@@ -401,7 +401,7 @@ double DocumentView::getLineYOffset( Int64 docIdx, Float lineHeight ) const {
|
||||
}
|
||||
|
||||
bool DocumentView::isLineVisible( Int64 docIdx ) const {
|
||||
return mDocLineToVisibleIndex.empty() ||
|
||||
return mDocLineToVisibleIndex.empty() || isOneToOne() ||
|
||||
( docIdx < static_cast<Int64>( mDocLineToVisibleIndex.size() ) &&
|
||||
mDocLineToVisibleIndex[docIdx] != static_cast<Int64>( VisibleIndex::invalid ) );
|
||||
}
|
||||
|
||||
@@ -1645,7 +1645,7 @@ void TextDocument::textInput( const String& text, bool mightBeInteresting ) {
|
||||
BoolScopedOp op( mDoingTextInput, true );
|
||||
BoolScopedOp op2( mInsertingText, true );
|
||||
|
||||
if ( 1 == text.size() ) {
|
||||
if ( 1 == text.size() && mAutoCloseBrackets ) {
|
||||
auto inserted = autoCloseBrackets( text );
|
||||
|
||||
if ( !inserted.empty() ) {
|
||||
|
||||
@@ -1585,7 +1585,7 @@ Uint32 UICodeEditor::onMouseDoubleClick( const Vector2i& position, const Uint32&
|
||||
if ( plugin->onMouseDoubleClick( this, position, flags ) )
|
||||
return UIWidget::onMouseDoubleClick( position, flags );
|
||||
|
||||
if ( mLocked || NULL == mFont )
|
||||
if ( NULL == mFont )
|
||||
return 1;
|
||||
|
||||
if ( mMinimapEnabled ) {
|
||||
@@ -1594,7 +1594,7 @@ Uint32 UICodeEditor::onMouseDoubleClick( const Vector2i& position, const Uint32&
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( flags & EE_BUTTON_LMASK ) {
|
||||
if ( isTextSelectionEnabled() && ( flags & EE_BUTTON_LMASK ) ) {
|
||||
mDoc->selectWord( false );
|
||||
mLastDoubleClick.restart();
|
||||
checkColorPickerAction();
|
||||
|
||||
@@ -51,7 +51,7 @@ Uint32 UITextEdit::getType() const {
|
||||
}
|
||||
|
||||
bool UITextEdit::isType( const Uint32& type ) const {
|
||||
return UITextEdit::getType() == type ? true : UIWidget::isType( type );
|
||||
return UITextEdit::getType() == type ? true : UICodeEditor::isType( type );
|
||||
}
|
||||
|
||||
void UITextEdit::setTheme( UITheme* Theme ) {
|
||||
|
||||
Reference in New Issue
Block a user