pyclient does not refresh default layout

Bug #633871 reported by Andrea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xibo
Fix Released
Medium
Alex Harrington

Bug Description

If a display has only default layout and its contents are modified,
python client keep showing the old layout.

I tried to solve it, forcing always to change the default layout
In XmdsScheduler.run() I modified this:
                try:
                        if self.__defaultLayout.layoutID != layoutID:
                           self.__defaultLayout = XiboLayout(layoutID,True)
                    except:
                        self.__defaultLayout = XiboLayout(layoutID,True)
into:
              self.__defaultLayout = XiboLayout(layoutID,True)
It seemed to work but I don't know if this solution has drawbacks.
Maybe this should be done only if the contents are different, even if
the layoutID's are the same.

Revision history for this message
Alex Harrington (alexharrington) wrote :

Yeah - you're right.

That code is new for 1.2.0a2 to support the new schedule format. All the other layouts in there get created fresh each time so I don't suppose it should be an issue if it were updated every time.

I don't see though how your code is working.

http://bazaar.launchpad.net/~xibo-maintainers/xibo/biela/annotate/head%3A/client/python/XiboClient.py#L2001

That code block is only executed if there is a schedule change. So unless there is a schedule change accompanied by the default layout change then the change will still be missed.

I need to think about this some more.

Alex

Changed in xibo:
status: New → Confirmed
assignee: nobody → Alex Harrington (alexharrington)
milestone: none → 1.2.0
Revision history for this message
Andrea (magnetto-andrea) wrote :

I've thought that maybe the try-except block can be useful,
so I modified it, this way:
                    try:
                        if self.__defaultLayout.layoutID != layoutID or True:
                           self.__defaultLayout = XiboLayout(layoutID,True)
                    except:
                        self.__defaultLayout = XiboLayout(layoutID,True)

Revision history for this message
Andrea (magnetto-andrea) wrote :

Ah you are referring to this condition:
    if self.previousSchedule != schedule:
I didn't check the reason but I saw that this
is true at every iteration.

Revision history for this message
Alex Harrington (alexharrington) wrote : Re: [Bug 633871] Re: pyclient does not refresh default layout

On Thu, 2010-09-09 at 11:02 +0000, Andrea wrote:
> Ah you are referring to this condition:
> if self.previousSchedule != schedule:
> I didn't check the reason but I saw that this
> is true at every iteration

OK - it shouldn't be.

Alex

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
Andrea (magnetto-andrea) wrote :

The value of self.previousSchedule is not changed anywhere.

Revision history for this message
Alex Harrington (alexharrington) wrote :

On Thu, 2010-09-09 at 12:00 +0000, Andrea wrote:
> The value of self.previousSchedule is not changed anywhere.

That'll be why then :D

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
Alex Harrington (alexharrington) wrote :

Can you try the code in the attached branch and let me know.

Revision history for this message
Andrea (magnetto-andrea) wrote :

It works well, it correctly changes the layout both if I change
its default layout and if I change its contents.

Thank you
Andrea

Changed in xibo:
status: Confirmed → Fix Committed
importance: Undecided → Medium
Dan Garner (dangarner)
Changed in xibo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.