Changeset 1210

Show
Ignore:
Timestamp:
04/11/07 06:41:08 (2 years ago)
Author:
arj..@yirdis.nl
Message:

Fixed show attributes/operations functionality

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/actions/itemactions.py

    r1201 r1210  
    306306        item = get_parent_focus_item(self._window) 
    307307        item.show_attributes = self.active 
     308        item.request_update() 
    308309 
    309310register_action(ShowAttributesAction, 'ItemFocus') 
     
    331332        item = get_parent_focus_item(self._window) 
    332333        item.show_operations = self.active 
     334        item.request_update() 
    333335 
    334336register_action(ShowOperationsAction, 'ItemFocus') 
  • gaphor/trunk/gaphor/diagram/classifier.py

    r1201 r1210  
    1515 
    1616class Compartment(list): 
    17     """Specify a compartment in a class item. 
     17    """ 
     18    Specify a compartment in a class item. 
    1819    A compartment has a line on top and a list of FeatureItems. 
    1920    """ 
     
    3233 
    3334    def has_item(self, item): 
    34         """Check if the compartment already contains an item with the 
     35        """ 
     36        Check if the compartment already contains an item with the 
    3537        same subject as item. 
    3638        """ 
     
    4042 
    4143    def get_size(self): 
    42         """Get width, height of the compartment. pre_update should have 
     44        """ 
     45        Get width, height of the compartment. pre_update should have 
    4346        been called so widthand height have been calculated. 
    4447        """ 
    45         return self.width, self.height 
     48        if self.visible: 
     49            return self.width, self.height 
     50        else: 
     51            return 0, 0 
    4652 
    4753    def pre_update(self, context): 
     
    378384        # draw compartments 
    379385        for comp in self._compartments: 
     386            if not comp.visible: 
     387                continue 
    380388            cr.save() 
    381389            cr.move_to(0, 0)