Changeset 11365:370f24214156 in orange


Ignore:
Timestamp:
02/21/13 20:02:00 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Changed ToolBox.removeItem and StackedWidget.removeWidget to not delete the widget.

This follows standard Qt4's semantics.

Location:
Orange/OrangeCanvas/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/gui/stackedwidget.py

    r11100 r11365  
    165165        """ 
    166166        index = self.__widgets.index(widget) 
    167         item = self.layout().takeAt(index) 
    168         assert(item.widget() is widget) 
     167        self.layout().removeWidget(widget) 
    169168        self.__widgets.pop(index) 
    170         widget.deleteLater() 
    171169 
    172170    def widget(self, index): 
  • Orange/OrangeCanvas/gui/toolbox.py

    r11280 r11365  
    355355 
    356356        page.button.deleteLater() 
    357         page.widget.deleteLater() 
     357 
     358        # Hide the widget and reparent to self 
     359        # This follows QToolBox.removeItem 
     360        page.widget.hide() 
     361        page.widget.setParent(self) 
    358362 
    359363        self.__updatePositions() 
Note: See TracChangeset for help on using the changeset viewer.