| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0009675 | ParaView | Bug | public | 2009-10-07 12:15 | 2016-08-12 09:57 | ||||
| Reporter | Chris Cameron | ||||||||
| Assigned To | Kitware Robot | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | moved | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | 3.4 | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0009675: Output window overwrites current selection instead of appending to end of document | ||||||||
| Description | When the output window receives new text it typically appends this text to the end of the output window. However: If a user selects a new cursor position or selects any text in the output window, and THEN new text is added to the output window, this new text will output at the cursor position, and replace the selection if there was one. The offending code appears to be this, in pqConsoleWidget.cxx void pqConsoleWidget::printString(const QString& Text) { this->Implementation->textCursor().movePosition(QTextCursor::End); this->Implementation->textCursor().insertText(Text); this->Implementation->InteractivePosition = this->Implementation->documentEnd(); this->Implementation->ensureCursorVisible(); } The problem is that textCursor() returns a COPY of the text cursor, so although the text is still inserted (I think because it has a pointer to the text document), the effects of movePosition(QTextCursor::End) are lost. I have had success by replacing that code with this: void pqConsoleWidget::printString(const QString& Text) { this->Implementation->append(Text); this->Implementation->InteractivePosition = this->Implementation->documentEnd(); this->Implementation->ensureCursorVisible(); } It works because this->Implementation is a QTextEdit, and QTextEdit has an append method which does what was intended by the former code block. Alternatively, I guess you could make a local variable of textCursor(), then call this->Implementation->setTextCursor() as well. | ||||||||
| Tags | No tags attached. | ||||||||
| Project | |||||||||
| Topic Name | |||||||||
| Type | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0037727) Kitware Robot (administrator) 2016-08-12 09:57 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2009-10-07 12:15 | Chris Cameron | New Issue | |
| 2016-08-12 09:57 | Kitware Robot | Note Added: 0037727 | |
| 2016-08-12 09:57 | Kitware Robot | Status | expired => closed |
| 2016-08-12 09:57 | Kitware Robot | Resolution | open => moved |
| 2016-08-12 09:57 | Kitware Robot | Assigned To | => Kitware Robot |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |