pen size text control is now enabled in the correct situations

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12704 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2005-05-18 00:51:15 +00:00
parent 987f7a0a18
commit e803c97c34

View File

@ -199,6 +199,10 @@ ObjectWindow::MessageReceived(BMessage* message)
if (message->FindInt32("type", &type) >= B_OK) {
fObjectView->SetObjectType(type);
fFillCB->SetEnabled(type != OBJECT_LINE);
if (!fFillCB->IsEnabled())
fPenSizeTC->SetEnabled(true);
else
fPenSizeTC->SetEnabled(fFillCB->Value() == B_CONTROL_OFF);
}
break;
}
@ -259,7 +263,10 @@ ObjectWindow::_UpdateControls() const
// disable penSize if fill is on
sprintf(string, "%.1f", fObjectView->StatePenSize());
fPenSizeTC->SetText(string);
fPenSizeTC->SetEnabled(!fFillCB->IsEnabled());
if (!fFillCB->IsEnabled())
fPenSizeTC->SetEnabled(true);
else
fPenSizeTC->SetEnabled(fFillCB->Value() == B_CONTROL_OFF);
}
// _GetColor