1.1 --- a/treeitem.cpp Fri Nov 13 08:32:03 2009 +0000
1.2 +++ b/treeitem.cpp Mon Jan 04 20:36:06 2010 +0000
1.3 @@ -625,45 +625,30 @@
1.4 }
1.5
1.6
1.7 -void TreeItem::setHideTmp (HideTmpMode mode) //FIXME-2 update visibility in derived objects...
1.8 +void TreeItem::setHideTmp (HideTmpMode mode) //FIXME-2 update visibility in derived objects
1.9 {
1.10 - /*
1.11 - if (type==Image)
1.12 - ((ImageItem*)this)->updateVisibility();
1.13 - */
1.14 + if (type==Image || type==Branch || type==MapCenter)
1.15 +// ((ImageItem*)this)->updateVisibility();
1.16 + {
1.17 + LinkableMapObj* lmo=((MapItem*)this)->getLMO();
1.18
1.19 - if (mode==HideExport && (hideExport || hasHiddenExportParent() ) )
1.20 + if (mode==HideExport && (hideExport || hasHiddenExportParent() ) ) // FIXME-2 try to avoid calling hasScrolledParent repeatedly
1.21 +
1.22 {
1.23 // Hide stuff according to hideExport flag and parents
1.24 - // if (lmo) lmo->setVisibility (false);
1.25 hidden=true;
1.26 + //if (lmo) lmo->setVisibility (false);
1.27 + updateVisibility(); // FIXME-3 missing for images
1.28 }else
1.29 {
1.30 // Do not hide, but still take care of scrolled status
1.31 hidden=false;
1.32 -/*
1.33 - XXXXXXXX treeItem should be THIS
1.34 -
1.35 - move visible to TreeItem???
1.36 -
1.37 - BranchObj now has updateContents
1.38 -*/
1.39 -/*
1.40 - if (isBranchLikeType() )
1.41 - ((BranchItem*)this)->updateVisibility();
1.42 -
1.43 - if ( ((BranchItem*)treeItem)->hasScrolledParent((BranchItem*)treeItem))
1.44 - setVisibility (false);
1.45 - else
1.46 - setVisibility (true);
1.47 -*/
1.48 - }
1.49 -
1.50 -/*
1.51 + updateVisibility();
1.52 + }
1.53 // And take care of my children
1.54 for (int i=0; i<branchCount(); ++i)
1.55 - getBranchNum(i)->setHideTmp (mode); // FIXME-4 maybe also consider images and other types
1.56 -*/
1.57 + getBranchNum(i)->setHideTmp (mode);
1.58 + }
1.59 }
1.60
1.61 bool TreeItem::hasHiddenExportParent()
1.62 @@ -682,7 +667,7 @@
1.63
1.64 void TreeItem::setHideInExport(bool b)
1.65 {
1.66 - if (type==Branch || type==Image)
1.67 + if (type==MapCenter ||type==Branch || type==Image)
1.68 {
1.69 hideExport=b;
1.70 if (b)