浏览代码

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();
   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->Superclass::keyPressEvent(e);
   this->updateCommandBuffer();
   this->updateCommandBuffer();
   this->updateCompleterIfVisible();
   this->updateCompleterIfVisible();