Skip to content

Commit f88c518

Browse files
committed
GeoData: remove applyOffset button and apply offset changes immediately
1 parent 4a33b59 commit f88c518

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/OpenCOVER/plugins/general/GeoData/GeoDataLoader.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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");

src/OpenCOVER/plugins/general/GeoData/GeoDataLoader.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ class GeoDataLoader : public opencover::coVRPlugin,
177177

178178
opencover::ui::Group *originGroup;
179179
opencover::ui::SelectionList *datasetList;
180-
opencover::ui::Button *applyOffsetButton;
181180
opencover::ui::Button *saveOffsetToConfig;
182181
opencover::ui::EditField *easting;
183182
opencover::ui::EditField *northing;

0 commit comments

Comments
 (0)