[Gui] remove unnecessary Boolean comparisons
This commit is contained in:
@@ -172,7 +172,7 @@ void ViewProviderDocumentObject::onChanged(const App::Property* prop)
|
||||
}
|
||||
else if (prop == &Visibility) {
|
||||
// use this bit to check whether show() or hide() must be called
|
||||
if (Visibility.testStatus(App::Property::User2) == false) {
|
||||
if (!Visibility.testStatus(App::Property::User2)) {
|
||||
Visibility.setStatus(App::Property::User2, true);
|
||||
Visibility.getValue() ? show() : hide();
|
||||
Visibility.setStatus(App::Property::User2, false);
|
||||
@@ -228,7 +228,7 @@ void ViewProviderDocumentObject::hide(void)
|
||||
{
|
||||
ViewProvider::hide();
|
||||
// use this bit to check whether 'Visibility' must be adjusted
|
||||
if (Visibility.testStatus(App::Property::User2) == false) {
|
||||
if (!Visibility.testStatus(App::Property::User2)) {
|
||||
Visibility.setStatus(App::Property::User2, true);
|
||||
Visibility.setValue(false);
|
||||
Visibility.setStatus(App::Property::User2, false);
|
||||
@@ -292,7 +292,7 @@ void ViewProviderDocumentObject::show(void)
|
||||
}
|
||||
|
||||
// use this bit to check whether 'Visibility' must be adjusted
|
||||
if (Visibility.testStatus(App::Property::User2) == false) {
|
||||
if (!Visibility.testStatus(App::Property::User2)) {
|
||||
Visibility.setStatus(App::Property::User2, true);
|
||||
Visibility.setValue(true);
|
||||
Visibility.setStatus(App::Property::User2, false);
|
||||
|
||||
Reference in New Issue
Block a user