[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/plugins/treeshape
From:       Cyril Oblikov <munknex () gmail ! com>
Date:       2010-07-29 17:19:21
Message-ID: 20100729171922.037E3AC782 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1156781 by oblikov:

Children' structure changes when user sets their parent's structure

 M  +3 -0      Layout.cpp  


--- trunk/koffice/plugins/treeshape/Layout.cpp #1156780:1156781
@@ -48,6 +48,7 @@
     Q_ASSERT(!m_children.contains(shape));
     TreeShape *tree = dynamic_cast<TreeShape*>(shape);
     if (tree) {
+        tree->setStructure(m_structure);
         tree->setZIndex(m_container->zIndex()+1);
         if (tree->nextShape()) {
             Q_ASSERT(m_children.contains(tree->nextShape()));
@@ -102,6 +103,8 @@
 void Layout::setStructure(TreeShape::TreeType structure)
 {
     m_structure = structure;
+    foreach(KoShape *shape, m_children)
+        dynamic_cast<TreeShape*>(shape)->setStructure(structure);
     scheduleRelayout();
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic