rename Ver to Dotted, fix show current value on first open

This commit is contained in:
hemirt 2018-07-03 15:45:25 +02:00
parent 4f30d950c7
commit 126e344f18

View file

@ -113,7 +113,20 @@ AppearancePage::AppearancePage()
messages.append(this->createCheckBox(LAST_MSG, app->settings->showLastMessageIndicator)); messages.append(this->createCheckBox(LAST_MSG, app->settings->showLastMessageIndicator));
{ {
auto *combo = new QComboBox(this); auto *combo = new QComboBox(this);
combo->addItems({"Ver", "Solid"}); combo->addItems({"Dotted", "Solid"});
const auto currentIndex = []() -> int {
switch (getApp()->settings->lastMessagePattern.getValue()) {
case Qt::SolidLine: {
return 1;
}
default:
case Qt::VerPattern: {
return 0;
}
}
}();
combo->setCurrentIndex(currentIndex);
QObject::connect(combo, QObject::connect(combo,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),