~ubuntu-branches/ubuntu/vivid/kdesdk/vivid

« back to all changes in this revision

Viewing changes to umbrello/umbrello/model_utils.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-06 11:49:54 UTC
  • mfrom: (0.4.21)
  • Revision ID: package-import@ubuntu.com-20120606114954-rdls73fzlpzxglbx
Tags: 4:4.8.80-0ubuntu1
* New uptream beta release
* Update dont_export_private_classes.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
}
303
303
 
304
304
/**
 
305
 * Get the root folder of the given UMLObject.
 
306
 */
 
307
UMLPackage* rootPackage(UMLObject* obj)
 
308
{
 
309
    if (obj == NULL)
 
310
        return NULL;
 
311
    UMLPackage* root = obj->umlPackage();
 
312
    if (root == NULL) {
 
313
        root = dynamic_cast<UMLPackage*>(obj);
 
314
    } else {
 
315
        while (root->umlPackage() != NULL) {
 
316
            root = root->umlPackage();
 
317
        }
 
318
    }
 
319
    return root;
 
320
}
 
321
 
 
322
/**
305
323
 * Add the given list of views to the tree view.
306
324
 * @param viewList   the list of views to add
307
325
 */
309
327
{
310
328
    UMLListView* tree = UMLApp::app()->listView();
311
329
    foreach (UMLView* v,  viewList) {
312
 
        if (tree->findItem(v->umlScene()->getID()) != NULL) {
 
330
        if (tree->findItem(v->umlScene()->ID()) != NULL) {
313
331
            continue;
314
332
        }
315
333
        tree->createDiagramItem(v);