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

**URL:** <https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260>\
**Category:** Feature requests\
**Tags:** segmentation, gui\
**Created:** [October 20, 2021, 11:02am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260 "2021-10-20T11:02:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DIV](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/div/32/12816_2.png) [@DIV](https://discourse.slicer.org/u/DIV)\
**Post date:** [October 20, 2021, 11:02am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/1 "2021-10-20T11:02:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DIV](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/div/32/12816_2.png) [@DIV](https://discourse.slicer.org/u/DIV)\
**Post date:** [December 1, 2021, 5:29am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/2 "2021-12-01T05:29:18Z")

</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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 22, 2021, 3:19pm UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/3 "2021-12-22T15:19:12Z")

</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.

---

<div class="post-metadata">

**Author:** ![DIV](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/div/32/12816_2.png) [@DIV](https://discourse.slicer.org/u/DIV)\
**Post date:** [March 31, 2022, 3:26am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/4 "2022-03-31T03:26:36Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/5/75224dc8ff850f3716f94b309e60637a0c16d544.png)

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](https://discourse.slicer.org/t/simple-color-vs-terminology-color-usage/20271/13).) 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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 19, 2022, 4:11am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/5 "2022-06-19T04:11:03Z")

</div>

> [@DIV](#):
>
> Interestingly, even if I switch to make a different `Segmentation` “active”, I still cannot shrink the pane.

I’ve implemented a small [fix](https://github.com/Slicer/Slicer/commit/5ecfcc37a51703bbd5638ecd6508541d35661e74) to prevent a long segmentation or master node name making the Segment Editor widget very wide.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 21, 2023, 2:04am UTC](https://discourse.slicer.org/t/segmentations-module-dont-automatically-expand-modules-settings-pane-for-long-file-folder-paths/20260/6 "2023-03-21T02:04:57Z")

</div>


