Review: Needs Information

What you have done is triggered the UI expansion from the keyboard which is 
correct but it does not persist the state of the UI over a save reload of the 
service.

Methods expand and collapse handle this, but I cannot see what triggers the 
repaint of the list!

Diff comments:

> === modified file 'openlp/core/ui/servicemanager.py'
> --- openlp/core/ui/servicemanager.py  2017-05-21 07:11:36 +0000
> +++ openlp/core/ui/servicemanager.py  2017-06-23 20:33:34 +0000
> @@ -1119,6 +1125,39 @@
>              return
>          self.service_manager_list.setCurrentItem(item_after)
>  
> +    def on_expand_selection(self):
> +        """
> +        Expands cursor selection on the window. Called by the right arrow
> +        """
> +        item = self.service_manager_list.currentItem()
> +

Sorry blank lines in methods are not required

> +        # Since we only have 2 levels we find them by checking for children
> +        if item.childCount():
> +            if not 
> self.service_manager_list.isExpanded(self.service_manager_list.currentIndex()):
> +                self.service_manager_list.expandItem(item)
> +                self.service_manager.expanded(item)
> +                # If not expanded, Expand it
> +
> +            
> self.service_manager_list.setCurrentItem(self.service_manager_list.itemBelow(item))
> +            # Then move selection down to child whether it needed to be 
> expanded or not
> +
> +    def on_collapse_selection(self):
> +        """
> +        Collapses cursor selection on the window Called by the left arrow
> +        """
> +        item = self.service_manager_list.currentItem()
> +
> +        # Since we only have 2 levels we find them by checking for children
> +        if item.childCount():
> +            if 
> self.service_manager_list.isExpanded(self.service_manager_list.currentIndex()):
> +                self.service_manager_list.collapseItem(item)
> +                self.service_manager.collapsed(item)
> +
> +        else:  # If selection is lower level
> +            self.service_manager_list.collapseItem(item.parent())
> +            self.service_manager.collapsed(item.parent())
> +            self.service_manager_list.setCurrentItem(item.parent())
> +
>      def on_collapse_all(self, field=None):
>          """
>          Collapse all the service items.


-- 
https://code.launchpad.net/~virbinarus/openlp/expandserviceitem/+merge/326248
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to