@@ -520,7 +520,26 @@ void EditorHelp::_update_doc() {
520
520
class_desc->push_table (2 );
521
521
class_desc->set_table_column_expand (1 , true );
522
522
523
+ char first_char;
523
524
for (int i = 0 ; i < cd.properties .size (); i++) {
525
+ const char new_char = cd.properties [i].name [0 ];
526
+ bool is_new_group = false ;
527
+
528
+ if (i < cd.properties .size () - 1 && new_char == cd.properties [i + 1 ].name [0 ] && new_char != first_char) {
529
+ is_new_group = i > 0 ;
530
+ first_char = new_char;
531
+ } else if (first_char != ' \0 ' && new_char != first_char) {
532
+ is_new_group = true ;
533
+ first_char = ' \0 ' ;
534
+ }
535
+
536
+ if (is_new_group) {
537
+ class_desc->push_cell ();
538
+ class_desc->pop (); // cell
539
+ class_desc->push_cell ();
540
+ class_desc->pop (); // cell
541
+ }
542
+
524
543
property_line[cd.properties [i].name ] = class_desc->get_line_count () - 2 ; // gets overridden if description
525
544
526
545
class_desc->push_cell ();
@@ -641,17 +660,17 @@ void EditorHelp::_update_doc() {
641
660
class_desc->pop (); // cell
642
661
}
643
662
644
- String group_prefix;
663
+ char group_prefix;
645
664
for (int i = 0 ; i < m.size (); i++) {
646
- const String new_prefix = m[i].name . substr ( 0 , 3 ) ;
665
+ const char new_prefix = m[i].name [ 0 ] ;
647
666
bool is_new_group = false ;
648
667
649
- if (i < m.size () - 1 && new_prefix == m[i + 1 ].name . substr ( 0 , 3 ) && new_prefix != group_prefix) {
668
+ if (i < m.size () - 1 && new_prefix == m[i + 1 ].name [ 0 ] && new_prefix != group_prefix) {
650
669
is_new_group = i > 0 ;
651
670
group_prefix = new_prefix;
652
- } else if (group_prefix != " " && new_prefix != group_prefix) {
671
+ } else if (group_prefix != ' \0 ' && new_prefix != group_prefix) {
653
672
is_new_group = true ;
654
- group_prefix = " " ;
673
+ group_prefix = ' \0 ' ;
655
674
}
656
675
657
676
if (is_new_group && pass == 1 ) {
0 commit comments