From: Chris Cannam <cannam@al...> - 2006-08-16 09:40:20
On Wednesday 16 Aug 2006 03:13, Vladimir Savic wrote:
> Start rg and right click on tempo ruler -- menu is there.
> Hit "New" icon and then right click on the same ruler -- menu is gone.
Hm. Guillaume, do you have any thoughts on this one? It's a KXMLGUI thing.
The tempo ruler is owned by the track editor object, and is destroyed and
re-created when a new document is opened.
The tempo ruler's right-button menu is loaded from temporuler.rc in the
TempoRuler constructor, using a KXMLGUIFactory passed in (which is in fact
the RosegardenGUIApp). The problem is that the second time a TempoRuler is
constructed, it fails to load the menu ("No menu TempoRuler in temporuler.rc"
from temporuler.cpp:151), and I can't immediately see why.
The segment tool's right-button menu does work even after it's destroyed and
recreated. That appears to be because it's extracting the menu from its
parent's rc file (rosegardenui.rc) instead of using its own. However, the
tempo ruler can't do that because it is also used in the notation and matrix
views, and I don't want to duplicate its menu definition into both of their
I'm guessing that the edit tools in the notation and matrix views don't have
this problem because their containing views don't outlive them (they're never
re-created in any given view).
Is the answer to make the tempo ruler into a KXMLGUIFactory rather than just a
client, perhaps? I have to admit I don't entirely understand the logic of