fix: remove some tabText() in groupWidget rename group

This commit is contained in:
xiaoyifang 2024-11-04 10:51:57 +08:00 committed by xiaoyifang
parent 6c0cedb3ec
commit 5ef4190b75

View file

@ -915,7 +915,7 @@ QString DictGroupsWidget::getCurrentGroupName() const
const int current = currentIndex();
if ( current >= 0 ) {
auto w = dynamic_cast< DictGroupWidget & >( *widget( x ) );
auto w = dynamic_cast< DictGroupWidget & >( *widget( current ) );
return w.name();
}
@ -928,7 +928,7 @@ void DictGroupsWidget::renameCurrentGroup( QString const & name )
const int current = currentIndex();
if ( current >= 0 ) {
auto w = dynamic_cast< DictGroupWidget & >( *widget( x ) );
auto w = dynamic_cast< DictGroupWidget & >( *widget( current ) );
w->setName( name );
setTabText( current, Utils::escapeAmps( name ) );
}