Skip to content

Commit fcad14a

Browse files
committed
Log usage of log scale button
This will log the usage of the log scale button. It will log once per plot tab, but reset if the user exits and re-enters the plot window - for all tabs.
1 parent c476ce5 commit fcad14a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ert/gui/tools/plot/plot_widget.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def __init__(
153153
# only for histogram plot see _sync_log_checkbox
154154
self._log_checkbox.setVisible(False)
155155
self._log_checkbox.setToolTip("Toggle data domain to log scale and back")
156+
self._log_checkbox.clicked.connect(self.logLogScaleButtonUsage)
156157

157158
log_checkbox_row = QHBoxLayout()
158159
log_checkbox_row.addWidget(self._log_checkbox)
@@ -188,6 +189,10 @@ def _sync_log_checkbox(self) -> None:
188189
def name(self) -> str:
189190
return self._name
190191

192+
def logLogScaleButtonUsage(self) -> None:
193+
logger.info(f"Plotwidget utility used: 'Log scale button' in tab '{self.name}'")
194+
self._log_checkbox.clicked.disconnect() # Log only once
195+
191196
def updatePlot(
192197
self,
193198
plot_context: "PlotContext",

0 commit comments

Comments
 (0)