* Return a zero width and empty destination string when there's no destination dir. Fixes #7462 +alpha3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41801 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
63d46f24e2
commit
d797e0629c
@ -681,11 +681,16 @@ BStatusView::Draw(BRect updateRect)
|
||||
BString
|
||||
BStatusView::_DestinationString(float* _width)
|
||||
{
|
||||
BString buffer(B_TRANSLATE("To: %dir"));
|
||||
buffer.ReplaceFirst("%dir", fDestDir);
|
||||
if (fDestDir.Length() > 0) {
|
||||
BString buffer(B_TRANSLATE("To: %dir"));
|
||||
buffer.ReplaceFirst("%dir", fDestDir);
|
||||
|
||||
*_width = ceilf(StringWidth(buffer.String()));
|
||||
return buffer;
|
||||
*_width = ceilf(StringWidth(buffer.String()));
|
||||
return buffer;
|
||||
} else {
|
||||
*_width = 0;
|
||||
return BString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user