From c278afdec1198a6e2d369ac6c8fbd9785543de5e Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 26 Nov 2014 09:48:57 +0100 Subject: [PATCH] BOptionPopUp: build fix. --- src/kits/interface/OptionPopUp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/OptionPopUp.cpp b/src/kits/interface/OptionPopUp.cpp index 8949aa4bc3..6f3e242503 100644 --- a/src/kits/interface/OptionPopUp.cpp +++ b/src/kits/interface/OptionPopUp.cpp @@ -194,7 +194,7 @@ BOptionPopUp::AllAttached() if (menu != NULL) { float labelWidth = fMenuField->StringWidth(fMenuField->Label()); if (labelWidth > 0.f) - labelWidth += kLabelSapce; + labelWidth += kLabelSpace; fMenuField->SetDivider(labelWidth); menu->SetTargetForItems(this); } @@ -219,7 +219,9 @@ BOptionPopUp::SetLabel(const char* text) // We are not sure the menu can keep the whole // string as label, so we check against the current label float newWidth = fMenuField->StringWidth(fMenuField->Label()); - fMenuField->SetDivider(newWidth + kLabelSpace); + if (newWidth > 0.f) + newWidth += kLabelSpace; + fMenuField->SetDivider(newWidth); }