Attribute Editor Title

In June 2021, the Attribute Editor (pqSMTKAttributePanel) was modified to add the attribute resource name to the window title, changing its tab label from “Attribute Editor” to, for example, “Attribute Editor(Analysis1)”. This is unwanted for projects that currently support only a single attribute resource and I want to make this renaming optional.

  • Are there any objections to making this window title change a cmake-configuration option?
  • The proposed cmake option is SMTK_ATTRIBUTE_PANEL_LONG_TITLE but I will take any suggestions that are shorter and/or more descriptive.
    • if the option is ON, then the current labeling is used, e.g., “Attribute Editor(Analysis1)”
    • if the option is OFF, then the previous labeling is used: “Attribute Editor”
    • my preference is to make this option OFF by default
    • my preference is also to make it an advanced option
  • Side note: there is currently no white space between the words “Attribute Editor” and the left parenthesis; does anyone know whether that is on purpose or is it an oversight? If the latter, I will add a space.

Alternatively. there should be a way for a Project or Attribute Resource (via its View information) to specify the panel’s title. For example, the top-level View could have a View Configuration Attribute (maybe called AttributePanelTitle) that can be used to set the panel?

With Tasks, it should be possible for the Task Specification to dictate the name of the Task Panel.

Would it be possible to add logic to append the name of the attribute resource only when there is more than one attribute resource registered (to the project)?

1 Like

I’m all for @C_Wetterer-Nelson’s solution or waiting for tasks as @Bob_Obara suggests.

The pqSMTKAttributePanel is a QDockWidget, so it has a public method to set the window title, and, therefore, the application can change the title at any time (though it is not obvious when to change the window title without getting overridden by the panel itself).

The intent of MR 2533 is to restore the original window title (“Attribute Editor”) as the default, and provide an option to use the newer window title. Maybe instead we should just restore the old logic and let applications override?

Almost forgot: the issue being addressed is independent of projects.

I’ve resolved this in merge request
https://gitlab.kitware.com/cmb/smtk/-/merge_requests/2540