From cfd92af2b680547d9b5176b001c03638a4a4d8d5 Mon Sep 17 00:00:00 2001 From: simonb Date: Sat, 22 Apr 2006 17:19:53 +0000 Subject: fix menu corruption when size/label changes --- ChangeLog | 3 +++ src/FbTk/Menu.cc | 3 +++ src/FbTk/MenuItem.cc | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b5bf528..a96f021 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.16: *06/04/22: + * Fix workspace menu corruption when window title changes (Simon) + sf.net bug #1113668 + Menu.cc MenuItem.cc * Fix crash when toolbar disabled (Simon) Slit.hh/cc Screen.cc * Couple of memory-based fixes from valgrind (Simon) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 0616906..4775ae9 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -444,6 +444,9 @@ void Menu::updateMenu(int active_index) { // must update main window size whether visible or not // the rest can wait until the end + if (menu.window.width() != new_width) + m_need_update = true; + menu.window.resize(new_width, new_height); if (!isVisible()) diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc index f39d03c..f8ec4e9 100644 --- a/src/FbTk/MenuItem.cc +++ b/src/FbTk/MenuItem.cc @@ -114,7 +114,7 @@ void MenuItem::draw(FbDrawable &draw, theme.frameFont().drawText(draw, // drawable theme.screenNum(), tgc.gc(), - m_label.c_str(), m_label.size(), // text string and lenght + label().c_str(), label().size(), // text string and lenght text_x, text_y); // position } -- cgit v0.11.2