[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker ralf.habacker at gmail.com
Fri Jan 20 23:01:53 UTC 2012


SVN commit 1274977 by habacker:

Cleaned up logic of tree view item rename.

 M  +0 -11     umllistview.cpp  
 M  +0 -1      umllistview.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #1274976:1274977
@@ -86,7 +86,6 @@
     m_doc(UMLApp::app()->document()),
     m_bStartedCut(false),
     m_bStartedCopy(false),
-    m_bIgnoreCancelRename(true),
     m_bCreatingChildObject(false),
     m_dragStartPosition(QPoint()),
     m_editItem(0)
@@ -1327,7 +1326,6 @@
     delete m_menu;
     m_menu = 0;
     m_bStartedCut = m_bStartedCopy = false;
-    m_bIgnoreCancelRename = true;
     m_bCreatingChildObject = false;
     headerItem()->setHidden(true);
 }
@@ -2270,11 +2268,6 @@
 bool UMLListView::itemRenamed(UMLListViewItem * item, int col)
 {
     DEBUG(DBG_SRC) << item->text(col);
-    //if true the item was cancel before this message
-    if (m_bIgnoreCancelRename) {
-        return true;
-    }
-    m_bIgnoreCancelRename = true;
     UMLListViewItem * renamedItem = static_cast< UMLListViewItem *>(item) ;
     UMLListViewItem::ListViewType type = renamedItem->type();
     QString newText = renamedItem->text(col);
@@ -2785,7 +2778,6 @@
         item->startRename(0);
         openPersistentEditor(item, 0);
         m_editItem = item;
-        m_bIgnoreCancelRename = true;
     }
     else {
         uError() << "Called without an item!";
@@ -2802,10 +2794,7 @@
         // delete pointer first to lock slotItemChanged
         m_editItem = 0;
         closePersistentEditor(item, 0);
-        if (!m_bIgnoreCancelRename) {
-            m_bIgnoreCancelRename = true;
         }
-    }
     else {
         uError() << "Called without an item!";
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.h #1274976:1274977
@@ -202,7 +202,6 @@
     UMLDoc*          m_doc;
     bool             m_bStartedCut;
     bool             m_bStartedCopy;
-    bool             m_bIgnoreCancelRename;
     bool m_bCreatingChildObject;  ///< when creating an attribute or an operation to stop it adding a second listViewItem
     QPoint m_dragStartPosition;
     UMLListViewItem* m_editItem;




More information about the umbrello-devel mailing list