From 22b8c01682f48204372eeef8d37517815d8073d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Wyszy=C5=84ski?= Date: Sat, 17 Feb 2018 02:11:24 +0100 Subject: [PATCH 1/3] Show more precision for doubles --- libspaghetti/source/nodes/ui/float_info.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libspaghetti/source/nodes/ui/float_info.cc b/libspaghetti/source/nodes/ui/float_info.cc index 670cc96..d4349d7 100644 --- a/libspaghetti/source/nodes/ui/float_info.cc +++ b/libspaghetti/source/nodes/ui/float_info.cc @@ -33,7 +33,7 @@ FloatInfo::FloatInfo() QFont font{}; font.setFamily("Consolas"); font.setPointSize(10); - auto widget = new QGraphicsSimpleTextItem(QString::number(0.0, 'f', 4)); + auto widget = new QGraphicsSimpleTextItem(QString::number(0.0, 'f', 8)); widget->setFont(font); auto brush = widget->brush(); @@ -49,7 +49,7 @@ void FloatInfo::refreshCentralWidget() { if (!m_element) return; float const value{ std::get(m_element->inputs()[0].value) }; - m_info->setText(QString::number(static_cast(value), 'f', 4)); + m_info->setText(QString::number(static_cast(value), 'f', 8)); calculateBoundingRect(); } From a8ce09d4023326100a3bc6da40b1337bcf9b7d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Wyszy=C5=84ski?= Date: Sat, 17 Feb 2018 02:12:48 +0100 Subject: [PATCH 2/3] Temporarily hide package's IO --- libspaghetti/source/ui/package_view.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libspaghetti/source/ui/package_view.cc b/libspaghetti/source/ui/package_view.cc index 3d58597..e70a597 100644 --- a/libspaghetti/source/ui/package_view.cc +++ b/libspaghetti/source/ui/package_view.cc @@ -117,6 +117,9 @@ PackageView::PackageView(QTableWidget *const a_properties, Package *const a_pack m_timer.start(); m_package->startDispatchThread(); + + m_inputs->hide(); + m_outputs->hide(); } PackageView::~PackageView() From 4d35d414b2cde836e68d4cd7bd15ca85ec4e01f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Artur=20Wyszy=C5=84ski?= Date: Sat, 17 Feb 2018 02:14:39 +0100 Subject: [PATCH 3/3] Temporarily disable sleeping for testing This sleep was because dt was 0 most of the time --- libspaghetti/source/package.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libspaghetti/source/package.cc b/libspaghetti/source/package.cc index 6f00fea..31f62a7 100644 --- a/libspaghetti/source/package.cc +++ b/libspaghetti/source/package.cc @@ -291,7 +291,7 @@ void Package::dispatchThreadFunction() } last = NOW; - std::this_thread::sleep_for(std::chrono::milliseconds(1)); +// std::this_thread::sleep_for(std::chrono::milliseconds(1)); if (m_pause) { spaghetti::log::trace("Pause requested..");