View Issue Details

IDProjectCategoryView StatusLast Update
0000530FreeCADBugpublic2011-12-10 17:41
Reportersparr0 Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.11 
Fixed in Version0.13 
Summary0000530: Python Console allows editing of history
DescriptionBeing able to move the cursor into the console history and type or paste into it is confusing and problematic. The cursor should behave like a console, not like an editor.

Bug 489 refers to this behavior but doesn't patch it.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2011-12-10 12:54

administrator   ~0001442

The point is it is an editor. At the time we were using Qt3 it was possible to inherit from (I think it was) QTextEdit and reimplement a couple of methods so that it wasn't possible to edit upper text. With Qt4 most of those methods weren't virtual anymore and thus there was no easy way to achieve the same behaviour. The only way was to reimplement one single method but then you'd to copy/paste 99% of the code.

sparr0

2011-12-10 13:07

reporter   ~0001443

I'm not sure what you mean by "it is an editor". What is the expected use case and desired outcome of me pasting code into the middle of a line in the history?

wmayer

2011-12-10 14:47

administrator   ~0001450

The Python console class inherits from QPlainTextEdit which is a full-featured text editor. So, you have to re-implement certain methods to suppress all the features you don't want.

Since this implementation wasn't touched for a long time I will re-check if the QT API has been changed to simplify this...

wmayer

2011-12-10 15:21

administrator   ~0001451

Last edited: 2011-12-10 15:21

The patch from 489 fixes almost all problems you mentioned. Using CTRL+V you cannot paste into the history but using the context-menu you can. I'll fix that.
You can still put the cursor into the history but when entering text it does nothing. Here it might better to swtich to the input line.

wmayer

2011-12-10 17:41

administrator   ~0001453

Fixed in rev 5258

Issue History

Date Modified Username Field Change
2011-12-10 12:03 sparr0 New Issue
2011-12-10 12:54 wmayer Note Added: 0001442
2011-12-10 13:07 sparr0 Note Added: 0001443
2011-12-10 14:48 wmayer Note Added: 0001450
2011-12-10 15:21 wmayer Note Added: 0001451
2011-12-10 15:21 wmayer Note Edited: 0001451
2011-12-10 17:41 wmayer Note Added: 0001453
2011-12-10 17:41 wmayer Status new => closed
2011-12-10 17:41 wmayer Resolution open => fixed
2011-12-10 17:41 wmayer Fixed in Version => 0.13