소스 검색

BUG: ctkConsole: Do not modify selected text color if outside interactive area

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Mayeul Chassagnard 8 년 전
부모
커밋
6684f74496
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      Libs/Widgets/ctkConsole.cpp

+ 5 - 1
Libs/Widgets/ctkConsole.cpp

@@ -537,7 +537,11 @@ void ctkConsolePrivate::keyPressEvent(QKeyEvent* e)
     }
 
   e->accept();
-  this->switchToUserInputTextColor();
+  //Don't change the color of text outside the interactive area
+  if (!message_output_area && !history_area)
+    {
+    this->switchToUserInputTextColor();
+    }
   this->Superclass::keyPressEvent(e);
   this->updateCommandBuffer();
   this->updateCompleterIfVisible();