mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 04:44:13 +00:00
fixed tunnels invalid ui data handling
This commit is contained in:
parent
21de4709ea
commit
1947be4957
@ -186,7 +186,7 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
|
|||||||
void TunnelPane::updated() {
|
void TunnelPane::updated() {
|
||||||
std::string oldName=tunnelConfig->getName();
|
std::string oldName=tunnelConfig->getName();
|
||||||
//validate and show red if invalid
|
//validate and show red if invalid
|
||||||
if(!applyDataFromUIToTunnelConfig())return;
|
if(!mainWindow->applyTunnelsUiToConfigs())return;
|
||||||
tunnelsPageUpdateListener->updated(oldName, tunnelConfig);
|
tunnelsPageUpdateListener->updated(oldName, tunnelConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,6 +756,14 @@ void MainWindow::deleteTunnelForms() {
|
|||||||
tunnelPanes.clear();
|
tunnelPanes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MainWindow::applyTunnelsUiToConfigs() {
|
||||||
|
for(std::list<TunnelPane*>::iterator it = tunnelPanes.begin(); it != tunnelPanes.end(); ++it) {
|
||||||
|
TunnelPane* tp = *it;
|
||||||
|
if(!tp->applyDataFromUIToTunnelConfig())return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::reloadTunnelsConfigAndUI(std::string tunnelNameToFocus) {
|
void MainWindow::reloadTunnelsConfigAndUI(std::string tunnelNameToFocus) {
|
||||||
deleteTunnelForms();
|
deleteTunnelForms();
|
||||||
for (std::map<std::string,TunnelConfig*>::iterator it=tunnelConfigs.begin(); it!=tunnelConfigs.end(); ++it) {
|
for (std::map<std::string,TunnelConfig*>::iterator it=tunnelConfigs.begin(); it!=tunnelConfigs.end(); ++it) {
|
||||||
|
@ -446,6 +446,7 @@ public:
|
|||||||
Ui::routerCommandsWidget* routerCommandsUI;
|
Ui::routerCommandsWidget* routerCommandsUI;
|
||||||
Ui::GeneralSettingsContentsForm* uiSettings;
|
Ui::GeneralSettingsContentsForm* uiSettings;
|
||||||
void adjustSizesAccordingToWrongLabel();
|
void adjustSizesAccordingToWrongLabel();
|
||||||
|
bool applyTunnelsUiToConfigs();
|
||||||
private:
|
private:
|
||||||
int settingsTitleLabelNominalHeight;
|
int settingsTitleLabelNominalHeight;
|
||||||
TextBrowserTweaked1 * textBrowser;
|
TextBrowserTweaked1 * textBrowser;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user