Skip to content

Commit

Permalink
Migration: Removed WSJTX View state from config
Browse files Browse the repository at this point in the history
The WSJTX View is changed to the sortable view.
I don't know why, but when the layout is saved, the sort indicator
is not displayed when the sortable view is turned on.
  • Loading branch information
foldynl committed Jun 26, 2024
1 parent 32cebf6 commit 1cd6b65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions core/Migration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ bool Migration::functionMigration(int version)
ret = fillCQITUZStationProfiles();
break;
case 28:
ret = resetCTYLastDate();
ret = resetConfigs();
break;
default:
ret = true;
Expand Down Expand Up @@ -628,13 +628,18 @@ bool Migration::fillCQITUZStationProfiles()
return true;
}

bool Migration::resetCTYLastDate()
bool Migration::resetConfigs()
{
FCT_IDENTIFICATION;

// to force redownload CTY file
QSettings settings;
settings.remove("last_cty_update");

// it changes to sortable view.
// I don't know why, but when the layout is saved, the sort indicator
// is not displayed when the sortable view is turned on. So I rather remove the view state
settings.remove("wsjtx/state");
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion core/Migration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Migration : public QObject
bool createTriggers();
bool importQSLCards2DB();
bool fillCQITUZStationProfiles();
bool resetCTYLastDate();
bool resetConfigs();
QString fixIntlField(QSqlQuery &query, const QString &columName, const QString &columnNameIntl);
bool refreshUploadStatusTrigger();

Expand Down

0 comments on commit 1cd6b65

Please sign in to comment.