Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRASS Shell cursor misbehaving #16322

Closed
qgib opened this issue Mar 12, 2013 · 12 comments
Closed

GRASS Shell cursor misbehaving #16322

qgib opened this issue Mar 12, 2013 · 12 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Mar 12, 2013

Author Name: Thomas W (Thomas W)
Original Redmine Issue: 7340
Affected QGIS version: master
Redmine category:grass
Assignee: Radim Blazek


In the GRASS Shell the cursor misbehaves badly. Typing a single character causes it to be half-obscured by the solid black cursor. With longer commands, the cursor continues to "lag" the typing, with the last two or more characters typed being invisible. Moving the cursor with the arrow keys results in the character the cursor is on showing correctly, but preceding characters being outright hidden.

I would say the behaviour renders the GRASS Shell in QGIS more or less unusable.

I am running Kubuntu 12.10, with QGIS installed from the ubuntugis PPA.

QGIS About page:

QGIS version
1.8.0-Lisboa
QGIS code revision
exported
Compiled against Qt
4.8.3
Running against Qt
4.8.3
Compiled against GDAL/OGR
1.9.2
Running against GDAL/OGR
1.9.2
GEOS Version
3.3.3
PostgreSQL Client Version
9.1.6
SpatiaLite Version
3.1.0-RC2
QWT Version
6.0.0-svn


@qgib
Copy link
Contributor Author

qgib commented Mar 13, 2013

Author Name: Giovanni Manghi (@gioman)


I have also seen this issue, it affects also master.


  • category_id was configured as GRASS
  • fixed_version_id was configured as Version 2.0.0
  • version was changed from 1.8.0 to master

@qgib
Copy link
Contributor Author

qgib commented Apr 6, 2013

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to Severe/Regression
  • operating_system was changed from to linux

@qgib
Copy link
Contributor Author

qgib commented May 1, 2013

Author Name: John Tull (John Tull)


A note to say this problem is reproducible on my OSX platform with trunk as of 01 May 2013.


  • operating_system was changed from linux to linux, OSX

@qgib
Copy link
Contributor Author

qgib commented May 30, 2013

Author Name: Radim Blazek (@blazek)


  • assigned_to_id was configured as Radim Blazek

@qgib
Copy link
Contributor Author

qgib commented May 30, 2013

Author Name: Radim Blazek (@blazek)


I cannot reproduce it on Debian with Qt 4.6.3.

The GRASS shell is using copy of http://qtermwidget.sourceforge.net project which is abandoned. QTermWidget was based on Konsole: https://projects.kde.org/projects/kde/applications/konsole. The right solution would probably be to update GRASS shell to use Konsole project but that is most probably a lot of work and it could introduce more problems than this issue.

Try to find if it is only refresh problem, i.e. if some characters are not displayed correctly try to resize the window, minimize and restore etc.

@qgib
Copy link
Contributor Author

qgib commented May 30, 2013

Author Name: Radim Blazek (@blazek)


The problem seems to be described here https://bugs.kde.org/show_bug.cgi?id=215937. It seems to be due to wrong font metrics or something like that. I am able to reproduce it changing

@font.setPointSize( 10 );@

to

@font.setPointSize( 20 );@

in src/plugins/grass/qtermwidget/qtermwidget.cpp. The font size in shell is not changed but cursor is shifted. The shift is fixed and does not depend on the length of the string typed.

@qgib
Copy link
Contributor Author

qgib commented May 30, 2013

Author Name: Radim Blazek (@blazek)


Fixed in changeset "8a4499b20dfc38581c0d844596431b7511050763".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 4, 2013

Author Name: Giovanni Manghi (@gioman)


does not work here on Linux Mint on the latest master. See attached screenshot.


  • 5840 was configured as grass_cli.mp4
  • status_id was changed from Closed to Feedback
  • priority_id was changed from Severe/Regression to High

@qgib
Copy link
Contributor Author

qgib commented Jun 6, 2013

Author Name: Radim Blazek (@blazek)


Some observations:

  • QTermWidget tries to set via TerminalDisplay::setVTFont font with family "Monospace"
  • setVTFont() calls QWidget::setFont() but it fails, the font is forced from somewhere else
  • if default font used for the widget is not monospace, width calculations do not work (even it seems that non monospace should also be supported, see _fixedFont flag) and result is cursor shift
  • the problem seems to appear especially on GNOME
  • default GNOME 3 font-name is "Cantarell 11" and that is applied also to GRASS shell
  • if I change the font in gconf: org > gnome > desktop > interface > font-name to "Courier", the shift disappeares

I'll try to find why it is not possible to set the font on the widget.

@qgib
Copy link
Contributor Author

qgib commented Jun 6, 2013

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from High to Normal

@qgib
Copy link
Contributor Author

qgib commented Jun 7, 2013

Author Name: Radim Blazek (@blazek)


Fixed in changeset "4c5c159ae297602fed631905669ffc0a92beb9d7".


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 7, 2013

Author Name: Radim Blazek (@blazek)


QWidget::setFont() does not guarantee to really change the font, I added

@setStyleSheet( "font-size: 10pt; font-family: Monospace;" )@

on the TerminalDisplay but it has some side effects like setting background to black so that some more changes were necessary.

I have tested on Gnome where cursor was shifted before and it works.

I have also set black on white scheme.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS
Projects
None yet
Development

No branches or pull requests

1 participant