Merge pull request #2764 from csoler/v0.6-BugFixing_30

Bug fixing
This commit is contained in:
csoler 2023-08-27 16:28:22 +02:00 committed by GitHub
commit 17562e727e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -95,6 +95,7 @@
#define ROW_SENTBOX 3
#define ROW_TRASHBOX 4
// #define DEBUG_MESSAGES_DIALOG 1
class MessageSortFilterProxyModel: public QSortFilterProxyModel
{
@ -365,15 +366,18 @@ void MessagesDialog::preModelUpdate()
if (m.isValid()) {
mTmpSavedCurrentId = m.sibling(m.row(), RsMessageModel::COLUMN_THREAD_MSGID).data(RsMessageModel::MsgIdRole).toString();
}
#ifdef DEBUG_MESSAGES_DIALOG
std::cerr << "Pre-change: saving selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl;
#endif
}
void MessagesDialog::postModelUpdate()
{
// restore selection
#ifdef DEBUG_MESSAGES_DIALOG
std::cerr << "Post-change: restoring selection for " << mTmpSavedSelectedIds.size() << " indexes" << std::endl;
#endif
QItemSelection sel;
foreach(const QString& s,mTmpSavedSelectedIds)

View File

@ -75,6 +75,7 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
ui.cmboLanguage->addItem(FilesDefs::getIconFromQtResourcePath(":/images/flags/" + code + ".png"), LanguageSupport::languageName(code), code);
}
foreach (QString style, QStyleFactory::keys()) {
if(style.toLower() != "gtk2" || (getenv("QT_QPA_PLATFORMTHEME")!=nullptr && !strcmp(getenv("QT_QPA_PLATFORMTHEME"),"gtk2"))) // make sure that if style is gtk2, the system has the correct environment variable set.
ui.cmboStyle->addItem(style, style.toLower());
}
@ -266,9 +267,9 @@ void AppearancePage::load()
index = ui.mainPageButtonType_CB->findData(Settings->getPageButtonLoc());
if (index != 0) {
ui.cmboTollButtonsStyle->hide();
}else {
ui.cmboTollButtonsStyle->show();
}else {
ui.cmboTollButtonsStyle->hide();
}
whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());