From 327ba8b631436cf21866c05c6c7cae239fe54a5c Mon Sep 17 00:00:00 2001 From: bd Date: Sat, 19 Apr 2025 02:45:38 -0400 Subject: Small UI cleanups --- gui/gui.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gui/gui.cc') diff --git a/gui/gui.cc b/gui/gui.cc index 0ba4867..a36920b 100644 --- a/gui/gui.cc +++ b/gui/gui.cc @@ -251,7 +251,7 @@ void GUI::on_upload_intructions_btn_clicked() "Binary Files (*.bin *.rv);;All Files (*.*)"); QFile file(filePath); if (filePath.isEmpty() || !file.open(QIODevice::ReadOnly)) { - this->set_status(get_bad_file); + this->set_status(get_no_instructions); return; } @@ -268,7 +268,10 @@ void GUI::on_upload_intructions_btn_clicked() } } - this->set_status(get_load_file); + if (this->p.empty()) + this->set_status(get_no_instructions); + else + this->set_status(get_load_file); file.close(); } @@ -306,5 +309,5 @@ void GUI::on_save_program_state_btn_clicked() void GUI::set_status(const std::function &func) { - this->status_label->setText("CPU SAYS: \"" + QString::fromStdString(func()) + "\""); + this->status_label->setText("COMPUTER SAYS: \"" + QString::fromStdString(func()) + "\""); } -- cgit v1.2.3