@@ -189,29 +189,30 @@ bool GeoDataLoader::init()
189189 easting = new ui::EditField (originGroup, " easting" );
190190 easting->setText (" Easting (m):" );
191191 easting->setCallback ([this ](std::string val)
192- { this ->tempEastingText = val; });
192+ {
193+ this ->tempEastingText = val;
194+ applyOffset (); });
193195
194196 northing = new ui::EditField (originGroup, " northing" );
195197 northing->setText (" Northing (m):" );
196198 northing->setCallback ([this ](std::string val)
197- { this ->tempNorthingText = val; });
199+ {
200+ this ->tempNorthingText = val;
201+ applyOffset (); });
198202
199203 altitude = new ui::EditField (originGroup, " altitude" );
200204 altitude->setText (" Altitude (m):" );
201205 altitude->setCallback ([this ](std::string val)
202- { this ->tempAltitudeText = val; });
206+ {
207+ this ->tempAltitudeText = val;
208+ applyOffset (); });
203209
204210 trueNorth = new ui::EditField (originGroup, " trueNorth" );
205211 trueNorth->setText (" True North (°):" );
206212 trueNorth->setCallback ([this ](std::string val)
207- { this ->tempTrueNorthText = val; });
208-
209- applyOffsetButton = new ui::Button (originGroup, " applyOffset" );
210- applyOffsetButton->setText (" apply" );
211- applyOffsetButton->setCallback ([this ](bool state)
212213 {
213- applyOffset () ;
214- applyOffsetButton-> setState ( false ); });
214+ this -> tempTrueNorthText = val ;
215+ applyOffset ( ); });
215216
216217 // TODO add option to rename dataset either with edit field or with editable selection list
217218 saveOffsetToConfig = new ui::Button (originGroup, " saveOffsetToConfig" );
0 commit comments