QT: fix title in custom chains

This commit is contained in:
Pablo Greco 2022-08-01 21:32:00 -03:00 committed by Glenn Willen
parent dea9125620
commit 93ebe3b98a

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;
}