diff --git a/Fireworks/Core/interface/FWSummaryManager.h b/Fireworks/Core/interface/FWSummaryManager.h index 2286917def4ed..14d6ae3beb5f1 100644 --- a/Fireworks/Core/interface/FWSummaryManager.h +++ b/Fireworks/Core/interface/FWSummaryManager.h @@ -16,7 +16,7 @@ // // Original Author: Chris Jones // Created: Tue Mar 4 09:35:58 EST 2008 -// $Id: FWSummaryManager.h,v 1.5 2009/01/23 21:35:41 amraktad Exp $ +// $Id: FWSummaryManager.h,v 1.6 2009/03/04 17:07:27 chrjones Exp $ // // system include files @@ -66,6 +66,7 @@ class FWSummaryManager void selectionChanged(const FWSelectionManager&); void newItem(FWEventItem* iItem); + void itemChanged(const FWEventItem*); void removeAllItems(); void changesDone(); @@ -76,6 +77,7 @@ class FWSummaryManager TGCompositeFrame* m_pack; std::vector m_collectionWidgets; FWGUIManager* m_guiManager; + bool m_itemChanged; }; diff --git a/Fireworks/Core/src/FWSummaryManager.cc b/Fireworks/Core/src/FWSummaryManager.cc index 9c7e17f73e41c..442618aa84b8b 100644 --- a/Fireworks/Core/src/FWSummaryManager.cc +++ b/Fireworks/Core/src/FWSummaryManager.cc @@ -8,7 +8,7 @@ // // Original Author: Chris Jones // Created: Tue Mar 4 09:35:32 EST 2008 -// $Id: FWSummaryManager.cc,v 1.7 2009/01/23 21:35:44 amraktad Exp $ +// $Id: FWSummaryManager.cc,v 1.8 2009/03/04 17:07:26 chrjones Exp $ // // system include files @@ -27,6 +27,7 @@ #include "Fireworks/Core/src/FWCollectionSummaryWidget.h" #include "Fireworks/Core/interface/FWDataCategories.h" +#include "Fireworks/Core/src/FWCompactVerticalLayout.h" // // constants, enums and typedefs @@ -44,7 +45,8 @@ FWSummaryManager::FWSummaryManager(TGFrame* iParent, FWEventItemsManager* eim, FWGUIManager* gm, FWModelChangeManager* cm) : - m_guiManager(gm) + m_guiManager(gm), +m_itemChanged(false) { sm->selectionChanged_.connect(boost::bind(&FWSummaryManager::selectionChanged,this,_1)); eim->newItem_.connect(boost::bind(&FWSummaryManager::newItem, @@ -53,6 +55,7 @@ FWSummaryManager::FWSummaryManager(TGFrame* iParent, m_pack = new TGVerticalFrame(iParent); + m_pack->SetLayoutManager( new FWCompactVerticalLayout(m_pack)); const unsigned int backgroundColor=0x2f2f2f; m_pack->SetBackgroundColor(backgroundColor); /*m_eventObjects = new TEveElementList("Physics Objects"); @@ -96,6 +99,7 @@ FWSummaryManager::newItem(FWEventItem* iItem) m_pack->AddFrame(lst, hints); m_collectionWidgets.push_back(lst); iItem->goingToBeDestroyed_.connect(boost::bind(&FWSummaryManager::itemDestroyed,this,_1)); + iItem->itemChanged_.connect(boost::bind(&FWSummaryManager::itemChanged,this,_1)); lst->Connect("requestForInfo(FWEventItem*)","FWSummaryManager",this,"requestForInfo(FWEventItem*)"); lst->Connect("requestForFilter(FWEventItem*)","FWSummaryManager",this,"requestForFilter(FWEventItem*)"); lst->Connect("requestForErrorInfo(FWEventItem*)","FWSummaryManager",this,"requestForError(FWEventItem*)"); @@ -113,6 +117,12 @@ FWSummaryManager::itemDestroyed(const FWEventItem* iItem) m_collectionWidgets[iItem->id()]=0; } +void +FWSummaryManager::itemChanged(const FWEventItem*) +{ + m_itemChanged = true; +} + void FWSummaryManager::removeAllItems() { @@ -137,6 +147,10 @@ FWSummaryManager::selectionChanged(const FWSelectionManager& iSM) void FWSummaryManager::changesDone() { + if(m_itemChanged) { + m_pack->Layout(); + m_itemChanged=false; + } } void