Opened 3 years ago

Closed 3 years ago

#4852 closed defect (fixed)

Journal star icon scrolls to top

Reported by: SAMdroid Owned by: SAMdroid
Priority: Normal Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Minor Keywords: patch
Cc: Distribution/OS: Fedora
Bug Status: New

Description

Steps to Reproduce:

  1. Scroll down (more than 2 entries down) in the journal
  2. Click the star icon

Result: You are scrolled to near the top of the journal

Expected result: Your scroll position is not affected

Change History (11)

comment:1 Changed 3 years ago by godiard

Is not only the star but any change in the Jornal metadata, try modify a entry title, and do the same.

comment:2 Changed 3 years ago by SAMdroid

Marginally related: Wouldn't it be nice if we could use real widgets in a GtkListBox [1], but it is Gtk 3.10 :(

[1] https://developer.gnome.org/gtk3/stable/GtkListBox.html

comment:3 Changed 3 years ago by SAMdroid

Hum, it appears to be because the self._scroll_position thing in jarabe.journal.listview.BaseListView.__model_ready_cb is now broken. Specifically setting it does not work.

comment:4 Changed 3 years ago by SAMdroid

More info: the scrolled adjustment is being set too early. It is set before the tree view is actually rendered.

Presumably that is why it is scrolling a bit of the way down - because Gtk is able to render only 1.2 (or so) times the height of the view.

comment:5 Changed 3 years ago by SAMdroid

Here is a better description: Model updates (eg. changing title) change the datastore. This leads to the recreation of the tree view model. The code that kept the scroll state between the model changes was not working, causing this bug.

comment:6 Changed 3 years ago by SAMdroid

  • Keywords patch added
  • Owner set to SAMdroid
  • Status changed from new to accepted

comment:8 Changed 3 years ago by quozl

Reproduced on Ubuntu 14.04.2 with Sugar 0.105.3.

comment:9 Changed 3 years ago by ignacio

I can't reproduce in Sugar 0.106 - in a xo 4 with "build 13.2.3 for Xo-4, Sugar-0.105 (build 2)" (Sugar 0.106 after yum install sugar, for update it). -

Was this fixed and the ticket wasn't closed?

comment:10 Changed 3 years ago by quozl

Still reproduces with Ubuntu 14.04.3 with Sugar 0.106.0. Let's keep it open until fixed.

comment:11 Changed 3 years ago by quozl

  • Resolution set to fixed
  • Status changed from accepted to closed

No longer reproduces in HEAD.

Note: See TracTickets for help on using tickets.