Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Commit

Permalink
Display data paths as tool tip in title editor (Contour Plot tab) (close
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Sep 8, 2018
1 parent 352a584 commit e5ecda3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -4,6 +4,7 @@
- New ancillary features in expert mode:
- Principal inertia ratio (dclab 0.6.3.dev1)
- Absolute tilt of raw contour (dclab 0.6.3.dev2)
- Display data paths as tool tip in title editor (Contour Plot tab) (#227)
0.8.7
- Bugfixes:
- Search for missing datasets was falsely extended to directories
Expand Down
10 changes: 10 additions & 0 deletions shapeout/gui/controls_contourplot.py
Expand Up @@ -4,6 +4,8 @@
"""
from __future__ import division, print_function, unicode_literals

import pathlib

import numpy as np
import wx

Expand Down Expand Up @@ -78,6 +80,7 @@ def _box_from_cfg_contour(self, analysis):
# title
tit = wx.TextCtrl(self, value=str(mm.title), size=(300, -1),
name="title "+mm.identifier)
tit.SetToolTip(wx.ToolTip(path2str(mm.path)))
# color
color = mm.config["plotting"]["contour color"]
# convert tuple to wxColour
Expand Down Expand Up @@ -123,3 +126,10 @@ def UpdatePanel(self, analysis):
ctrl_targets=["kde accuracy {}".format(a) for a in axes])
self.SetSizer(sizer)
sizer.Fit(self)


def path2str(path):
"""Safely convert a path to a string"""
if isinstance(path, pathlib.Path):
path = path.as_uri()
return path

0 comments on commit e5ecda3

Please sign in to comment.