From: jh777916 Date: Fri, 8 Sep 2023 13:46:53 +0000 (+0200) Subject: Adding the modification of the zorder to the toggleHighlight for Barplots X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fbfdf8a453283fb16bb12cda1f4370e733898d26;p=modules%2Fgui.git Adding the modification of the zorder to the toggleHighlight for Barplots --- diff --git a/tools/CurvePlot/src/python/views/BarView.py b/tools/CurvePlot/src/python/views/BarView.py index 187af9b14..47125c925 100644 --- a/tools/CurvePlot/src/python/views/BarView.py +++ b/tools/CurvePlot/src/python/views/BarView.py @@ -32,6 +32,7 @@ class BarView(View): self._initialLineWidth = None self._initialEdgeColorBar = None self._initialAlpha = None + self._initialZOrder = None self._parentXYView = parentXYView self._facecolor = None @@ -57,11 +58,8 @@ class BarView(View): self._initialLineWidth = 0. #self._mplBars[0].get_linewidth() self._initialEdgeColorBar = self._mplBars[0].get_edgecolor() self._initialAlpha = self._mplBars[0].get_alpha() + self._initialZOrder = self._mplBars[0].get_zorder() - # Logger.Debug(" > Bar initial lw : {}".format(self._initialLineWidth)) - # Logger.Debug(" > Bar initial ec : {}".format(self._initialEdgeColorBar)) - # Logger.Debug(" > Bar initial alpha : {}".format(self._initialAlpha)) - def onCurveTitleChange(self): if self._mplBars is None: return @@ -87,12 +85,14 @@ class BarView(View): rect.set_linewidth(1.) rect.set_alpha(1) rect.set_edgecolor("crimson") + rect.set_zorder(1000) self._isHighlighted = True elif not highlight and (force or self._isHighlighted): for rect in bar : rect.set_linewidth(self._initialLineWidth) rect.set_alpha(self._initialAlpha) rect.set_edgecolor(self._initialEdgeColorBar) + rect.set_zorder(self._initialZOrder) self._isHighlighted = False else: # Nothing to do, already the correct state