From 604ebc2c6b892b5a68854d4375583796af4638b6 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Sun, 14 May 2017 20:23:24 +0300 Subject: [PATCH] Fix add headwords to Favorites for RTL languages --- mainwindow.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mainwindow.cc b/mainwindow.cc index b0d4e07a..4b9222d0 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -4444,6 +4444,14 @@ void MainWindow::addCurrentTabToFavorites() QString headword = ui.tabWidget->tabText( ui.tabWidget->currentIndex() ); + // Reset table header to original headword + + headword.replace( "&&", "&" ); + if( headword.startsWith( QChar( 0x202E ) ) ) + headword = headword.mid( 1 ); + if( headword.endsWith( QChar( 0x202C ) ) ) + headword.chop( 1 ); + ui.favoritesPaneWidget->addHeadword( folder, headword ); }