File->Save menu option does not update with a canvas name

The gui menu to save a canvas with its default name does not update, when canvas name is being updated in the program?

TCanvas* c = new TCanvas("AAAAA", "title", 600, 600);
//The menu shows "AAAAA" name like on the screenshot. Produces files with name: AAAAA
c->SetName("BBBBB");
c->Modified();
c->Update();
//The menu shows "AAAAA" name like on the screenshot. Produces files with name: BBBBB


image

I see the same problem as you. It may well be that this menu is created once and never changed later on. @bellenot can confirm.

Notes:

  • c->SetTitle("BBBBB"); is working. The Title on the top is re-displayed.
  • Modified() and Update() acts only on the graphics contained in the canvas, not on the GUI.

Right, the menu entries are created at construction time. See TRootCanvas::CreateCanvas(const char *name)