[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Dec 24 01:38:02 UTC 2004
CVS commit by okellogg:
loadFromXMI(): Make sure we have a listview item for each diagram.
It may happen that we are missing them after switching off tabbed widgets.
M +13 -2 umldoc.cpp 1.223
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.222:1.223
@@ -2172,8 +2172,19 @@ bool UMLDoc::loadFromXMI( QIODevice & fi
if (viewToBeSet) {
Settings::OptionState optionState = UMLApp::app()->getOptionState();
- if (optionState.generalState.tabdiagrams)
+ if (optionState.generalState.tabdiagrams) {
UMLApp::app()->tabWidget()->showPage(viewToBeSet);
- else
+ } else {
changeCurrentView( m_nViewID );
+ // Make sure we have a treeview item for each diagram.
+ // It may happen that we are missing them after switching off
+ // tabbed widgets.
+ UMLListView *lv = UMLApp::app()->getListView();
+ for (UMLViewListIt vit(m_ViewList); vit.current(); ++vit) {
+ UMLView *v = vit.current();
+ if (lv->findItem(v->getID()) != NULL)
+ continue;
+ lv->createDiagramItem(v);
+ }
+ }
} else {
createDiagram( Uml::dt_Class, false );
More information about the umbrello-devel
mailing list