diff --git a/qt/i2pd_qt/TunnelPane.cpp b/qt/i2pd_qt/TunnelPane.cpp index a8baed6f..0cd7b741 100644 --- a/qt/i2pd_qt/TunnelPane.cpp +++ b/qt/i2pd_qt/TunnelPane.cpp @@ -186,7 +186,7 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters, void TunnelPane::updated() { std::string oldName=tunnelConfig->getName(); //validate and show red if invalid - if(!applyDataFromUIToTunnelConfig())return; + if(!mainWindow->applyTunnelsUiToConfigs())return; tunnelsPageUpdateListener->updated(oldName, tunnelConfig); } diff --git a/qt/i2pd_qt/mainwindow.cpp b/qt/i2pd_qt/mainwindow.cpp index 217ec958..bf26964d 100644 --- a/qt/i2pd_qt/mainwindow.cpp +++ b/qt/i2pd_qt/mainwindow.cpp @@ -756,6 +756,14 @@ void MainWindow::deleteTunnelForms() { tunnelPanes.clear(); } +bool MainWindow::applyTunnelsUiToConfigs() { + for(std::list::iterator it = tunnelPanes.begin(); it != tunnelPanes.end(); ++it) { + TunnelPane* tp = *it; + if(!tp->applyDataFromUIToTunnelConfig())return false; + } + return true; +} + void MainWindow::reloadTunnelsConfigAndUI(std::string tunnelNameToFocus) { deleteTunnelForms(); for (std::map::iterator it=tunnelConfigs.begin(); it!=tunnelConfigs.end(); ++it) { diff --git a/qt/i2pd_qt/mainwindow.h b/qt/i2pd_qt/mainwindow.h index 1b55a6da..3b65d3c2 100644 --- a/qt/i2pd_qt/mainwindow.h +++ b/qt/i2pd_qt/mainwindow.h @@ -446,6 +446,7 @@ public: Ui::routerCommandsWidget* routerCommandsUI; Ui::GeneralSettingsContentsForm* uiSettings; void adjustSizesAccordingToWrongLabel(); + bool applyTunnelsUiToConfigs(); private: int settingsTitleLabelNominalHeight; TextBrowserTweaked1 * textBrowser;