+2006-03-15 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * MenuBackend.C (expand): make sure the menu is empty before
+ starting.
+
+ * MenuBackend.h (clear): new method.
+
2006-03-13 Martin Vermeer <martin.vermeer@hut.fi>
* rowpainter.C (paintChangeBar): fix painting of change bar with
void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
LyXView const * view) const
{
+ if (!tomenu.empty())
+ tomenu.clear();
+
for (Menu::const_iterator cit = frommenu.begin();
cit != frommenu.end() ; ++cit) {
switch (cit->kind()) {
std::string const & name() const { return name_; }
///
bool empty() const { return items_.empty(); }
+ /// Clear the menu content.
+ void clear() { items_.clear(); }
///
ItemList::size_type size() const { return items_.size(); }
///