Skip to content

Commit

Permalink
Change default button maps load order
Browse files Browse the repository at this point in the history
Load from default location first and only if customized maps are available in application data storage location to override
  • Loading branch information
SwoopX committed Dec 7, 2020
1 parent 311d86d commit d50bea3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions de_web_plugin.cpp
Expand Up @@ -761,9 +761,9 @@ DeRestPluginPrivate::DeRestPluginPrivate(QObject *parent) :
}

const QStringList buttonMapLocations = {
deCONZ::getStorageLocation(deCONZ::ApplicationsDataLocation) + QLatin1String("/devices/button_maps.json")
#ifdef Q_OS_LINUX
, "/usr/share/deCONZ/devices/button_maps.json"
QLatin1String("/usr/share/deCONZ/devices/button_maps.json"), deCONZ::getStorageLocation(deCONZ::ApplicationsDataLocation) +
QLatin1String("/devices/button_maps.json")
#endif
#ifdef Q_OS_WIN
, qApp->applicationDirPath() + QLatin1String("/../devices/button_maps.json")
Expand Down
2 changes: 1 addition & 1 deletion read_files.cpp
Expand Up @@ -161,7 +161,7 @@ QMap<QString, QString> loadButtonMapModelIdsJson(const QJsonDocument &buttonMaps

if (buttonMapModelIds.size() == 0)
{
DBG_Printf(DBG_INFO, "[ERROR] - Button map '%s' in JSON file has no assigned ModelIDs. Skip loading button map...\n", qPrintable(buttonMapName));
DBG_Printf(DBG_INFO, "[WARNING] - Button map '%s' in JSON file has no assigned ModelIDs. Skip loading button map...\n", qPrintable(buttonMapName));
continue; // Skip button map
}

Expand Down

0 comments on commit d50bea3

Please sign in to comment.