* 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:
@@ -681,11 +681,16 @@ BStatusView::Draw(BRect updateRect)
|
|||||||
BString
|
BString
|
||||||
BStatusView::_DestinationString(float* _width)
|
BStatusView::_DestinationString(float* _width)
|
||||||
{
|
{
|
||||||
BString buffer(B_TRANSLATE("To: %dir"));
|
if (fDestDir.Length() > 0) {
|
||||||
buffer.ReplaceFirst("%dir", fDestDir);
|
BString buffer(B_TRANSLATE("To: %dir"));
|
||||||
|
buffer.ReplaceFirst("%dir", fDestDir);
|
||||||
|
|
||||||
*_width = ceilf(StringWidth(buffer.String()));
|
*_width = ceilf(StringWidth(buffer.String()));
|
||||||
return buffer;
|
return buffer;
|
||||||
|
} else {
|
||||||
|
*_width = 0;
|
||||||
|
return BString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user