~ubuntu-branches/ubuntu/oneiric/guiqwt/oneiric

« back to all changes in this revision

Viewing changes to guiqwt/histogram.py

  • Committer: Bazaar Package Importer
  • Author(s): Picca Frédéric-Emmanuel
  • Date: 2011-05-06 14:24:18 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110506142418-y6rlxuod7e52jfdr
Tags: 2.1.3-1
* Imported Upstream version 2.1.3
* debian/control
  - remove the Depends: python-qscintilla2 (useless now)
  - add Suggests: spyder as recommended by the upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
        self.del_items(del_curves)
242
242
 
243
243
    def selection_changed(self, plot):
244
 
        items = plot.get_selected_items(IVoiImageItemType)
 
244
        items = plot.get_selected_items(item_type=IVoiImageItemType)
245
245
        known_items = self._tracked_items.setdefault(plot, {})
246
246
 
247
247
        if items:
250
250
                # Removing any cached item for other plots
251
251
                for other_plot, _items in self._tracked_items.items():
252
252
                    if other_plot is not plot:
253
 
                        if not other_plot.get_selected_items(IVoiImageItemType):
 
253
                        if not other_plot.get_selected_items(
 
254
                                                item_type=IVoiImageItemType):
254
255
                            other_known_items = self._tracked_items[other_plot]
255
256
                            self.__del_known_items(other_known_items, [])
256
257
        else:
257
258
            # if all items are deselected we keep the last known
258
259
            # selection (for one plot only)
259
260
            for other_plot, _items in self._tracked_items.items():
260
 
                if other_plot.get_selected_items(IVoiImageItemType):
 
261
                if other_plot.get_selected_items(item_type=IVoiImageItemType):
261
262
                    self.__del_known_items(known_items, [])
262
263
                    break
263
264
                
293
294
            self.replot()
294
295
 
295
296
    def active_item_changed(self, plot):
296
 
        items = plot.get_selected_items(IVoiImageItemType)
 
297
        items = plot.get_selected_items(item_type=IVoiImageItemType)
297
298
        if not items:
298
299
            #XXX: workaround
299
300
            return