Browse Source

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 years ago
parent
commit
6684f74496
1 changed files with 5 additions and 1 deletions
  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();