]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
Q3map2:
[xonotic/netradiant.git] / radiant / mainframe.cpp
index 1c956db0b9cf341a3f8b610f7af4b4a01095439f..5e7ccc16f00e9265cd0a7a9a18b8a46e4b044279 100644 (file)
@@ -1163,6 +1163,12 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                         && selectable->isSelected() ) {
                        return false;
                }
+               if( doMakeUnique && instance.childSelected() ){
+                       NodeSmartReference clone( Node_Clone_Selected( path.top() ) );
+                       Map_gatherNamespaced( clone );
+                       Node_getTraversable( path.parent().get() )->insert( clone );
+                       return false;
+               }
        }
 
        return true;
@@ -1916,6 +1922,7 @@ GtkMenuItem* create_edit_menu(){
 //     }
        create_menu_item_with_mnemonic( menu, "Select All Of Type", "SelectAllOfType" );
        create_menu_item_with_mnemonic( menu, "_Expand Selection To Entities", "ExpandSelectionToEntities" );
+       create_menu_item_with_mnemonic( menu, "Select Connected Entities", "SelectConnectedEntities" );
 
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Pre_ferences...", "Preferences" );
@@ -1994,6 +2001,7 @@ GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){
                        create_menu_item_with_mnemonic( orthographic_menu, "Center on Selected", "NextView" );
                }
 
+               create_menu_item_with_mnemonic( orthographic_menu, "Focus on Selected", "XYFocusOnSelected" );
                create_menu_item_with_mnemonic( orthographic_menu, "Center on Selected", "CenterXYView" );
                menu_separator( orthographic_menu );
                create_menu_item_with_mnemonic( orthographic_menu, "_XY 100%", "Zoom100" );
@@ -3393,6 +3401,10 @@ void Maximize_View(){
                g_maximizeview.toggle();
 }
 
+void FocusAllViews(){
+       XY_Centralize(); //using centralizing here, not focusing function
+       GlobalCamera_FocusOnSelected();
+}
 
 #include "preferencesystem.h"
 #include "stringio.h"
@@ -3431,6 +3443,7 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "SelectInside", FreeCaller<Select_Inside>() );
        GlobalCommands_insert( "SelectTouching", FreeCaller<Select_Touching>() );
        GlobalCommands_insert( "ExpandSelectionToEntities", FreeCaller<Scene_ExpandSelectionToEntities>(), Accelerator( 'E', (GdkModifierType)GDK_SHIFT_MASK ) );
+       GlobalCommands_insert( "SelectConnectedEntities", FreeCaller<SelectConnectedEntities>(), Accelerator( 'E', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalCommands_insert( "Preferences", FreeCaller<PreferencesDialog_showDialog>(), Accelerator( 'P' ) );
 
        GlobalCommands_insert( "ToggleConsole", FreeCaller<Console_ToggleShow>(), Accelerator( 'O' ) );