From 8f850909a96d49f7565a1586764ab8eed86858e1 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Mon, 17 Jun 2019 09:43:30 +0300
Subject: [PATCH] Add hide window shortcut in GUI

---
 applications/gui/src/main.cpp                 | 6 +++++-
 applications/reconstruct/src/registration.cpp | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/applications/gui/src/main.cpp b/applications/gui/src/main.cpp
index 3df95ca79..ea45a23ce 100644
--- a/applications/gui/src/main.cpp
+++ b/applications/gui/src/main.cpp
@@ -118,7 +118,7 @@ class FTLApplication : public nanogui::Screen {
 		using namespace nanogui;
 		net_ = net;
 
-		auto cwindow = new ftl::gui::ControlWindow(this, controller);
+		cwindow_ = new ftl::gui::ControlWindow(this, controller);
 		swindow_ = new ftl::gui::SourceWindow(this, controller);
 
 		//src_ = nullptr;
@@ -203,6 +203,9 @@ class FTLApplication : public nanogui::Screen {
 				float scalar = (key == 264) ? 0.99f : 1.01f;
 				eye_ = ((eye_ - centre_) * scalar) + centre_;
 				return true;
+			} else if (action == 1 && key == 'H') {
+				swindow_->setVisible(!swindow_->visible());
+				cwindow_->setVisible(!cwindow_->visible());
 			}
 			return false;
 		}
@@ -277,6 +280,7 @@ class FTLApplication : public nanogui::Screen {
 
 	private:
 	ftl::gui::SourceWindow *swindow_;
+	ftl::gui::ControlWindow *cwindow_;
 	//std::vector<SourceViews> sources_;
 	ftl::net::Universe *net_;
 	nanogui::GLShader mShader;
diff --git a/applications/reconstruct/src/registration.cpp b/applications/reconstruct/src/registration.cpp
index ccb17ac50..ec27f43ba 100644
--- a/applications/reconstruct/src/registration.cpp
+++ b/applications/reconstruct/src/registration.cpp
@@ -233,7 +233,7 @@ Eigen::Matrix4f findTransformation(vector<PointCloud<PointXYZ>::Ptr> clouds_sour
 		// score new transformation
 		double score = 0.0;
 		for (size_t j = 0; j < n_clouds; ++j) {
-			score += validate.validateTransformation(clouds_source[j], clouds_target[j], T); // CHECK Is use of T here a mistake??
+			score += validate.validateTransformation(clouds_source[j], clouds_target[j], T_tmp); // CHECK Is use of T here a mistake??
 		}
 		score /= n_clouds;
 		
-- 
GitLab