Switching between workspaces
Hello,
It seems that the current way to switch from a workspace to another and avoid segfault with regards to menu manipulation requires a cumbersome operation, I quote (probably NN) :
void macularModelerWorkspace::enter(void)
{
dtkWidgetsMenuBar *menu_bar = dtkApp->window()->menubar();
if (!d->grid_menu) {
d->grid_menu = menu_bar->menu("Grid graph");
d->object_motion_menu = menu_bar->menu("Object motion graph");
d->retinal_waves_menu = menu_bar->menu("Retinal waves graph");
} else {
menu_bar->insertMenu(0,d->retinal_waves_menu);
menu_bar->insertMenu(0,d->object_motion_menu);
menu_bar->insertMenu(0,d->grid_menu);
menu_bar->touch();
}
}
void macularModelerWorkspace::leave(void)
{
dtkWidgetsMenuBar *menu_bar = dtkApp->window()->menubar();
menu_bar->removeMenu(d->grid_menu);
menu_bar->removeMenu(d->object_motion_menu);
menu_bar->removeMenu(d->retinal_waves_menu);
}
I there anything in the pipe to avoid having to write these lines ?
Cheers.
Edited by LE BRETON Come