[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Jul 18 23:20:02 UTC 2004
CVS commit by okellogg:
contentsMousePressEvent(): Remove pointless call to UMLDoc::activate().
getSelectedItems(): Improve debuggability.
createItem(): Start fixing bug 85375.
M +10 -9 umllistview.cpp 1.107
--- kdesdk/umbrello/umbrello/umllistview.cpp #1.106:1.107
@@ -115,7 +115,4 @@ void UMLListView::contentsMousePressEven
case Uml::lvt_Component_Diagram:
case Uml::lvt_Deployment_Diagram:
- if( ! m_doc->activateView( item->getID()))
- KMessageBox::error( kapp -> mainWidget(), i18n("Could not activate the diagram."), i18n("Diagram Load Error"));
- else
m_doc -> changeCurrentView(item->getID());
emit diagramSelected( item->getID());
@@ -370,4 +367,5 @@ void UMLListView::popupMenuSel(int sel)
case ListPopupMenu::mt_Paste:
m_doc -> editPaste();
+ break;
default:
@@ -1050,5 +1048,6 @@ bool UMLListView::getSelectedItems(UMLLi
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
- ItemList.append((UMLListViewItem*)it.current());
+ UMLListViewItem *item = (UMLListViewItem*)it.current();
+ ItemList.append(item);
}
}
@@ -1071,5 +1070,4 @@ UMLListViewItem* UMLListView::createItem
return 0;
}
- int newID;
switch(lvt) {
@@ -1084,5 +1082,6 @@ UMLListViewItem* UMLListView::createItem
case Uml::lvt_Datatype:
case Uml::lvt_Enum:
- newID = IDChanges.findNewID(Data.getID());
+ /***
+ int newID = IDChanges.findNewID(Data.getID());
//if there is no ListViewItem associated with the new ID,
//it could exist an Item already asocciated if the user chose to reuse an uml object
@@ -1090,5 +1089,7 @@ UMLListViewItem* UMLListView::createItem
pObject = m_doc->findUMLObject( IDChanges.findNewID(Data.getID()) );
item = new UMLListViewItem(parent, Data.getText(), lvt, pObject);
- }
+ } ***/
+ pObject = m_doc->findUMLObject( Data.getID() );
+ item = new UMLListViewItem(parent, Data.getText(), lvt, pObject);
break;
case Uml::lvt_Logical_Folder:
@@ -1103,5 +1104,5 @@ UMLListViewItem* UMLListView::createItem
{
UMLClass * pClass = (UMLClass *)parent -> getUMLObject();
- newID = IDChanges.findNewID( Data.getID() );
+ int newID = IDChanges.findNewID( Data.getID() );
pObject = pClass -> findChildObject( newID );
if (pObject) {
More information about the umbrello-devel
mailing list