Skip to content

Commit

Permalink
setdata
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar Gutierrez Fernandez committed Sep 26, 2024
1 parent 73e566f commit fa45a02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/silx/gui/data/DataViews.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,6 @@ def createWidget(self, parent):

self.__aggregationModeAction = AggregationModeAction(parent=widget)
widget.toolBar().addAction(self.__aggregationModeAction)
self.__aggregationModeAction.setVisible(True)
self.__aggregationModeAction.sigAggregationModeChanged.connect(self._aggregationModeChanged)

widget.setKeepDataAspectRatio(True)
Expand All @@ -1082,10 +1081,8 @@ def createWidget(self, parent):
maskToolsWidget.setItemMaskUpdated(True)
return widget

def getAggregationModeAction(self):
def getAggregationModeAction(self) -> AggregationModeAction:
"""Action toggling the aggregation mode action
:rtype: actions.PlotAction
"""
return self.__aggregationModeAction

Expand Down Expand Up @@ -1120,9 +1117,9 @@ def setData(self, data):
imageItem.setColormap(plot.getDefaultColormap())
plot.addItem(imageItem)

plot.addImage(
legend="data", data=data, resetzoom=self.__resetZoomNextTime
)
imageItem.setData(data=data)
if self.__resetZoomNextTime:
plot.resetZoom()
self.__resetZoomNextTime = False

def setDataSelection(self, selection):
Expand Down
2 changes: 1 addition & 1 deletion src/silx/gui/plot/items/image_aggregated.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _getLevelOfDetails(self) -> Tuple[int, int]:
return lodx, lody

@docstring(ImageDataBase)
def setData(self, data, copy=True, **kwargs):
def setData(self, data, copy=True):
self.__cacheLODData = {} # Reset cache
super().setData(data)

Expand Down

0 comments on commit fa45a02

Please sign in to comment.