[Igarden-commit] Garden/source/PlanTool TextBoxInfoPanel.cpp, 1.4, 1.4.2.1
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-02-11 21:41:30
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv25213 Modified Files: Tag: Release_branch_v1 TextBoxInfoPanel.cpp Log Message: BUG: Don't allow changing the border style if the box is tool small. BUG: Don't display title GetInfo for text boxes Index: TextBoxInfoPanel.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/TextBoxInfoPanel.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** TextBoxInfoPanel.cpp 13 Jan 2006 23:37:52 -0000 1.4 --- TextBoxInfoPanel.cpp 11 Feb 2007 21:41:25 -0000 1.4.2.1 *************** *** 35,42 **** TextBoxInfoPanel::TextBoxInfoPanel(MaterialInfoForm *parent, TextBox *elem) : ElementInfoPanel(parent, 179, kTextBoxPaneID) { ! XGPopControl *formatPop, *stylePop; TitleBox *title; ! XGStaticText *staticText; _elem = elem; --- 35,48 ---- TextBoxInfoPanel::TextBoxInfoPanel(MaterialInfoForm *parent, TextBox *elem) : ElementInfoPanel(parent, 179, kTextBoxPaneID) { ! XGPopControl *formatPop = dynamic_cast<XGPopControl*>(_view->FindViewByID(kTitleFormatPopupID)); ! XGPopControl *stylePop; TitleBox *title; ! XGStaticText *staticText = dynamic_cast<XGStaticText*>(_view->FindViewByID(kTitleFormatStaticID)); ! XGView *titleButton = _view->FindViewByID(kTitleValuesButtonID); ! planRectangle_t bounds; ! planLength_t minSize; ! + _elem = elem; *************** *** 47,50 **** --- 53,64 ---- stylePop->SetValue(elem->GetBorder()); + // For now, disable the entire menu if too small for a rounded rect + bounds = elem->GetBoundingRectangle(); + minSize = elem->MinimumSize(_parent->GetPlanView(), kBorderRounded); + if(bounds.xSize > minSize && bounds.ySize > minSize) + stylePop->EnableView(); + else + stylePop->DisableView(); + title = dynamic_cast<TitleBox*>(elem); if(title != NULL) *************** *** 53,60 **** String name; - staticText = dynamic_cast<XGStaticText*>(_view->FindViewByID(kTitleFormatStaticID)); staticText->ShowView(); - formatPop = dynamic_cast<XGPopControl*>(_view->FindViewByID(kTitleFormatPopupID)); formatPop->ShowView(); count = TitleBox::NumTitleTypes(); --- 67,73 ---- String name; staticText->ShowView(); formatPop->ShowView(); + titleButton->ShowView(); count = TitleBox::NumTitleTypes(); *************** *** 66,69 **** --- 79,88 ---- formatPop->SetValue(title->GetTitleType()); } + else + { + staticText->HideView(); + formatPop->HideView(); + titleButton->HideView(); + } } |