[Uml-devel] KDE/kdesdk/umbrello/umbrello
Sharan Rao
sharanrao at gmail.com
Fri Feb 15 17:39:40 UTC 2008
SVN commit 775390 by sharan:
Fix crash on - Double Click on Note Widget
Looking at the fix from a macroscopic view, it seems like a hack to me. If we are going to need access to actions in places other than the ListPopupMenu, maybe we should associate the actions with the Widgets ? and not have them as strongly coupled with the ListPopupMenu ? Suggestions/Comments ?
CCBUG:153437
M +4 -0 notewidgetcontroller.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/notewidgetcontroller.cpp #775389:775390
@@ -41,6 +41,10 @@
void NoteWidgetController::doMouseDoubleClick(QMouseEvent* /*me*/) {
//TODO Copied from old code. What it does?
if (m_noteWidget->m_DiagramLink == Uml::id_None) {
+ // setup popup menu if not already created.
+ if ( !m_noteWidget->m_pMenu )
+ m_noteWidget->setupPopupMenu();
+
QAction* action = m_noteWidget->m_pMenu->getAction(ListPopupMenu::mt_Rename);
m_noteWidget->slotMenuSelection(action);
} else {
More information about the umbrello-devel
mailing list