@@ -25,7 +25,7 @@ import * as React from 'react';
25
25
import * as commonStorage from '../storage/common_storage' ;
26
26
import * as storageModule from '../storage/module' ;
27
27
import * as storageProject from '../storage/project' ;
28
- import { EditOutlined , DeleteOutlined , CopyOutlined } from '@ant-design/icons' ;
28
+ import { EditOutlined , DeleteOutlined , CopyOutlined , SelectOutlined } from '@ant-design/icons' ;
29
29
import ClassNameComponent from './ClassNameComponent' ;
30
30
31
31
/** Represents a module in the file management system. */
@@ -54,7 +54,7 @@ const DEFAULT_PAGE_SIZE = 5;
54
54
const MODAL_WIDTH = 800 ;
55
55
56
56
/** Actions column width in pixels. */
57
- const ACTIONS_COLUMN_WIDTH = 120 ;
57
+ const ACTIONS_COLUMN_WIDTH = 160 ;
58
58
59
59
/**
60
60
* Modal component for managing files (mechanisms and opmodes) within a project.
@@ -125,12 +125,20 @@ export default function FileManageModal(props: FileManageModalProps) {
125
125
126
126
setModules ( newModules ) ;
127
127
triggerProjectUpdate ( ) ;
128
+
129
+ // Close the rename modal first
130
+ setRenameModalOpen ( false ) ;
131
+
132
+ // Automatically select and open the newly created module
133
+ props . gotoTab ( newModulePath ) ;
134
+ props . onClose ( ) ;
135
+
128
136
} catch ( error ) {
129
137
console . error ( 'Error renaming module:' , error ) ;
130
138
props . setAlertErrorMessage ( t ( 'FAILED_TO_RENAME_MODULE' ) ) ;
139
+ setRenameModalOpen ( false ) ;
131
140
}
132
141
133
- setRenameModalOpen ( false ) ;
134
142
} ;
135
143
136
144
/** Handles copying a module. */
@@ -276,6 +284,14 @@ export default function FileManageModal(props: FileManageModalProps) {
276
284
width : ACTIONS_COLUMN_WIDTH ,
277
285
render : ( _ , record : Module ) => (
278
286
< Antd . Space size = "small" >
287
+ < Antd . Tooltip title = { t ( 'Select' ) } >
288
+ < Antd . Button
289
+ type = "text"
290
+ size = "small"
291
+ icon = { < SelectOutlined /> }
292
+ onClick = { ( ) => handleRowDoubleClick ( record ) }
293
+ />
294
+ </ Antd . Tooltip >
279
295
< Antd . Tooltip title = { t ( 'RENAME' ) } >
280
296
< Antd . Button
281
297
type = "text"
0 commit comments