Segmentations module: don't automatically expand module's settings pane for long file/folder paths

I have noticed that when I select the Segmentations module the greyish pane at left of screen where all of the settings for that module are entered will expand if the path to the Destination folder under Export to files is rather lengthy. (I imagine that there is no limit imposed on the expansion.)
While it’s nice to be able to see the entire path at a glance, the serious disadvantage is that the viewing area is encroached upon. While the vertical separator between the two ‘halves’ of the screen can be moved, it cannot be dragged further left.

A possible solution would be to:

  • not automatically expand the module’s pane (thereby preserving space for the viewing port);
  • display the path name in ellipted (abbreviated) form, such as “C:\users\DIV\…\subsubsubdir” (this style of presentation is already implemented elsewhere in Slicer, such as in the full path to the *.mrml file shown next to Data Probe in several modules);
  • display the full path name in a tooltip (tooltips are already implemented elsewhere throughout Slicer).

Analogous behaviour to this proposed solution is seen in other (Windows) applications.

—DIV

Is anybody else bothered by this?
Does anyone have a suggestion to fix it?
Maybe the code relating to ctkDirectoryButton (e.g. in qMRMLSegmentationFileExportWidget.ui and qSlicerCLIModuleUIHelper.cxx) could be relevant? Perhaps something to do with setSizePolicy?
—DIV

I’ve pushed a fix for this today. Long paths are now elided (middle is replaced by ...) in directory buttons instead of requiring a lot of space for displaying the full path.

1 Like

Something similar occurs in both the Segmentations module and the Segment Editor module for the name of the Segmentation (and Segment?).

Maybe this is not typical of all users, but I had output an STL file with a rather long filename to try to keep track of the process used to generate it. (As I’ve said elsewhere, I may want to compare different attempted segmentations of the same anatomy.) I then reloaded it with the Data button as a segmentation, and with the existing name the panel at the left takes up a minimum of half my screen (note that the application is maximised in the above screenshot).
Interestingly, even if I switch to make a different Segmentation “active”, I still cannot shrink the pane.

Whereas for a file path it’s usual to put ellipsis at the start or in the middle (and then display the full path in a tooltip), for an object name I think it’s more usual to put the ellipsis at the end (and then display the full name in a tooltip).
—DIV