diff -r 6269016c9905 -r c6bb4fdcc55f branchpropwindow.cpp --- a/branchpropwindow.cpp Thu Aug 06 10:42:17 2009 +0000 +++ b/branchpropwindow.cpp Sat Aug 08 21:58:26 2009 +0000 @@ -46,10 +46,6 @@ show(); else hide(); - - // FIXME-2 for now remove attribute tab - ui.tabWidget->removeTab (3); - } BranchPropertyWindow::~BranchPropertyWindow () @@ -59,17 +55,22 @@ settings.setValue( "/satellite/propertywindow/showWithMain",isVisible() ); } -void BranchPropertyWindow::setBranch (BranchItem *bi) +void BranchPropertyWindow::setItem (TreeItem *ti) { disconnectSignals(); - branchItem=bi; - if (branchItem) + if (!ti) + ui.tabWidget->setEnabled (false); + else if (ti->isBranchLikeType() ) { + branchItem=(BranchItem*)ti; branch=(BranchObj*)(branchItem->getLMO()); - if (branch) // FIXME-3 move to branchItem later, when Frame is ported... + if (branch) // FIXME-3 replace by branchItem later, when Frame is ported... { ui.tabWidget->setEnabled (true); + for (int i=0; i<3;++i) + ui.tabWidget->setTabEnabled (i,true); + ui.tabWidget->setTabEnabled (3,false); // Frame FrameObj::FrameType t=branch->getFrameType(); @@ -153,7 +154,13 @@ // Finally activate signals connectSignals(); - } // BranchObj + } // BranchItem + } else if (ti->getType()==TreeItem::Attribute) + { + ui.tabWidget->setEnabled (true); + for (int i=0; i<3;++i) + ui.tabWidget->setTabEnabled (i,false); + ui.tabWidget->setTabEnabled (3,true); } else { ui.tabWidget->setEnabled (false); @@ -164,7 +171,7 @@ { model=m; if (model) - setBranch (model->getSelectedBranchItem() ); + setItem (model->getSelectedItem() ); else ui.tabWidget->setEnabled (false); @@ -185,7 +192,7 @@ model->setFramePadding (5); break; } - setBranch (branchItem); + setItem (branchItem); } }