]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patch.h
Merge branch 'master' into master-merge
[xonotic/netradiant.git] / radiant / patch.h
index 89deeac95ceadb55a04e9d2d5e311bb86d88dd66..45d53fa845b85676ae2a6e9b1558713a13544127 100644 (file)
@@ -1422,6 +1422,11 @@ void allocate( std::size_t size ){
 
 void setSelected( bool select ){
        m_selectable.setSelected( select );
+       if ( !select && parent() ){
+               Selectable* sel_parent = Instance_getSelectable( *parent() );
+               if ( sel_parent && sel_parent->isSelected() )
+                       sel_parent->setSelected( false );
+       }
 }
 bool isSelected() const {
        return m_selectable.isSelected();
@@ -1580,6 +1585,13 @@ void transformComponents( const Matrix4& matrix ){
        }
 }
 
+void invertComponentSelection(){
+       for ( PatchControlInstances::iterator i = m_ctrl_instances.begin(); i != m_ctrl_instances.end(); ++i )
+       {
+               ( *i ).m_selectable.setSelected( !( *i ).m_selectable.isSelected() );
+       }
+}
+
 
 void selectPlanes( Selector& selector, SelectionTest& test, const PlaneCallback& selectedPlaneCallback ){
        test.BeginMesh( localToWorld() );
@@ -1810,6 +1822,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };
@@ -1834,6 +1849,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };
@@ -1857,6 +1875,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };