mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
qt: fixed great ui pains with tunnels editing
This commit is contained in:
parent
9c6e3ff1d7
commit
669fb62a54
10 changed files with 68 additions and 53 deletions
|
@ -15,7 +15,7 @@ SaverImpl::SaverImpl(MainWindow *mainWindowPtr_, QList<MainWindowItem*> * config
|
|||
|
||||
SaverImpl::~SaverImpl() {}
|
||||
|
||||
bool SaverImpl::save(const bool focusOnTunnel, const std::string& tunnelNameToFocus) {
|
||||
bool SaverImpl::save(bool reloadAfterSave, const FocusEnum focusOn, const std::string& tunnelNameToFocus, QWidget* widgetToFocus) {
|
||||
//save main config
|
||||
{
|
||||
std::stringstream out;
|
||||
|
@ -59,12 +59,14 @@ bool SaverImpl::save(const bool focusOnTunnel, const std::string& tunnelNameToFo
|
|||
outfile.close();
|
||||
}
|
||||
|
||||
//reload saved configs
|
||||
if(reloadAfterSave) {
|
||||
//reload saved configs
|
||||
#if 0
|
||||
i2p::client::context.ReloadConfig();
|
||||
i2p::client::context.ReloadConfig();
|
||||
#endif
|
||||
|
||||
if(focusOnTunnel) emit reloadTunnelsConfigAndUISignal(QString::fromStdString(tunnelNameToFocus));
|
||||
if(reloadAfterSave) emit reloadTunnelsConfigAndUISignal(focusOn==FocusEnum::focusOnTunnelName?QString::fromStdString(tunnelNameToFocus):"");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue