Re: [gtkmm] Removing a menu entry



Solved. I delete the object:

> void TopMenuBar::removeDataBaseMenu(const int& itemNr)
> {
>   cout << "      removing #" << itemNr << endl;
> 
>   MenuList& ml = m_dataBase_menu->items();
>   int i = 0;
>   MenuList::iterator itr_ml;
>   for (itr_ml = ml.begin(); itr_ml != ml.end(); ++itr_ml) {
>         if (i == itemNr) {
>           itr_ml->remove();
>           delete &*itr_ml;
>    }
>         i++;
>   }
>   glTabCnt--;
> 
> } // removeDataBaseMenu()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]