| 1939 | } |
| 1940 | |
| 1941 | bool ImGuiMenu::drawGeneralOptions( const std::vector<std::shared_ptr<Object>>& selectedObjs ) |
| 1942 | { |
| 1943 | bool someChanges = false; |
| 1944 | const auto& selectedVisualObjs = SceneCache::getAllObjects<VisualObject, ObjectSelectivityType::Selected>(); |
| 1945 | if ( !selectedVisualObjs.empty() ) |
| 1946 | { |
| 1947 | const auto& viewportid = viewer->viewport().id; |
| 1948 | if ( make_visualize_checkbox( selectedVisualObjs, _tr( "Visibility" ), VisualizeMaskType::Visibility, viewportid ) ) |
| 1949 | { |
| 1950 | someChanges = true; |
| 1951 | if ( sceneObjectsList_->getDeselectNewHiddenObjects() ) |
| 1952 | for ( const auto& visObj : selectedVisualObjs ) |
| 1953 | if ( !visObj->isVisible( viewer->getPresentViewports() ) ) |
| 1954 | visObj->select( false ); |
| 1955 | } |
| 1956 | } |
| 1957 | |
| 1958 | bool hasLocked = false, hasUnlocked = false; |
| 1959 | for ( const auto& s : selectedObjs ) |
| 1960 | { |
| 1961 | if ( s->isLocked() ) |
| 1962 | hasLocked = true; |
| 1963 | else |
| 1964 | hasUnlocked = true; |
| 1965 | } |
| 1966 | const bool mixedLocking = hasLocked && hasUnlocked; |
| 1967 | bool checked = hasLocked; |
| 1968 | someChanges |= UI::checkboxMixed( _tr( "Lock Transform" ), &checked, mixedLocking ); |
| 1969 | if ( checked != hasLocked ) |
| 1970 | for ( const auto& s : selectedObjs ) |
| 1971 | s->setLocked( checked ); |
| 1972 | |
| 1973 | return someChanges; |
| 1974 | } |
| 1975 | |
| 1976 | bool ImGuiMenu::drawAdvancedOptions( const std::vector<std::shared_ptr<VisualObject>>& selectedObjs, SelectedTypesMask selectedMask ) |
| 1977 | { |
no test coverage detected