message: qt: Save/restore RPCConsole geometry only for window
diff: @@ -454,12 +454,20 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
  {
  ui->setupUi(this);
  QSettings settings;
  +#ifdef ENABLE_WALLET
  + if (WalletModel::isWalletEnabled()) {
  + // RPCConsole widget is a window.
  if (!restoreGeometry(settings.value("RPCConsoleWindowGeometry").toByteArray())) {
  // Restore failed (perhaps missing setting), center the window
  move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
  }
  -
  - ui->splitter->restoreState(settings.value("PeersTabSplitterSizes").toByteArray());
  + ui->splitter->restoreState(settings.value("RPCConsoleWindowPeersTabSplitterSizes").toByteArray());
  + } else
  +#endif // ENABLE_WALLET
  + {
  + // RPCConsole is a child widget.
  + ui->splitter->restoreState(settings.value("RPCConsoleWidgetPeersTabSplitterSizes").toByteArray());
  + }
  constexpr QChar nonbreaking_hyphen(8209);
  const std::vector<QString> CONNECTION_TYPE_DOC{
  @@ -522,8 +530,18 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
  RPCConsole::~RPCConsole()
  {
  QSettings settings;
  +#ifdef ENABLE_WALLET
  + if (WalletModel::isWalletEnabled()) {
  + // RPCConsole widget is a window.
  settings.setValue("RPCConsoleWindowGeometry", saveGeometry());
  - settings.setValue("PeersTabSplitterSizes", ui->splitter->saveState());
  + settings.setValue("RPCConsoleWindowPeersTabSplitterSizes", ui->splitter->saveState());
  + } else
  +#endif // ENABLE_WALLET
  + {
  + // RPCConsole is a child widget.
  + settings.setValue("RPCConsoleWidgetPeersTabSplitterSizes", ui->splitter->saveState());
  + }
  +
  m_node.rpcUnsetTimerInterface(rpcTimerInterface);
  delete rpcTimerInterface;
  delete ui;
  