Merge pull request #1130 from psgreco/master-qtfixtitle

QT: fix title in custom chains
This commit is contained in:
Glenn Willen 2022-08-03 12:05:51 -07:00 committed by GitHub
commit 1be529a11b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,5 +91,8 @@ const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
}
// If it doesn't match any, use regtest since it's a custom chain
assert(networkId != "regtest");
return instantiate("regtest");
// but keep the chain name in the title
NetworkStyle* instance = const_cast<NetworkStyle*>(instantiate("regtest"));
instance->titleAddText = titleAddText.c_str();
return instance;
}