Skip to content

Commit

Permalink
Merge pull request #2764 from csoler/v0.6-BugFixing_30
Browse files Browse the repository at this point in the history
Bug fixing
  • Loading branch information
csoler authored Aug 27, 2023
2 parents e8872c6 811b3b3 commit 17562e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion retroshare-gui/src/gui/msgs/MessagesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 95,7 @@
#define ROW_SENTBOX 3
#define ROW_TRASHBOX 4

// #define DEBUG_MESSAGES_DIALOG 1

class MessageSortFilterProxyModel: public QSortFilterProxyModel
{
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions retroshare-gui/src/gui/settings/AppearancePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 75,8 @@ 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()) {
ui.cmboStyle->addItem(style, style.toLower());
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());
}

QMap<QString, QString> styleSheets;
Expand Down Expand Up @@ -266,9 267,9 @@ void AppearancePage::load()

index = ui.mainPageButtonType_CB->findData(Settings->getPageButtonLoc());
if (index != 0) {
ui.cmboTollButtonsStyle->hide();
}else {
ui.cmboTollButtonsStyle->show();
ui.cmboTollButtonsStyle->show();
}else {
ui.cmboTollButtonsStyle->hide();
}

whileBlocking(ui.mainPageButtonType_CB)->setCurrentIndex(!Settings->getPageButtonLoc());
Expand Down

0 comments on commit 17562e7

Please sign in to comment.