From 0e8942af4ae16fb8a9aaf038ab6167b16762e7d0 Mon Sep 17 00:00:00 2001 From: alaindargelas <63669492+alaindargelas@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:13:37 -0700 Subject: [PATCH] Fix Pin Planner crash (#1710) * Fix Pin Planner crash * Incremented patch version --------- Co-authored-by: alaindargelas --- CMakeLists.txt | 2 +- src/MainWindow/main_window.cpp | 4 ---- src/PinAssignment/PinAssignmentBaseView.cpp | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 216780cdc..b1272f2b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ set(VERSION_MINOR 0) # Add the spdlog directory to the include path include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/include ${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk ${CMAKE_CURRENT_SOURCE_DIR}/third_party/scope_guard) -set(VERSION_PATCH 431) +set(VERSION_PATCH 432) option( diff --git a/src/MainWindow/main_window.cpp b/src/MainWindow/main_window.cpp index e586f11dd..885d24331 100644 --- a/src/MainWindow/main_window.cpp +++ b/src/MainWindow/main_window.cpp @@ -897,9 +897,7 @@ void MainWindow::createMenus() { toolsMenu = menuBar()->addMenu("&Tools"); toolsMenu->addAction(ipConfiguratorAction); -#ifndef PRODUCTION_BUILD toolsMenu->addAction(pinAssignmentAction); -#endif toolsMenu->addAction(programmerAction); toolsMenu->addAction(eFpgaConfigurator); @@ -914,9 +912,7 @@ void MainWindow::createMenus() { helpMenu->addAction(compressProjectAction); preferencesMenu->addAction(defualtProjectPathAction); -#ifndef PRODUCTION_BUILD preferencesMenu->addAction(pinPlannerPinNameAction); -#endif preferencesMenu->addAction(editorSettingsAction); preferencesMenu->addAction(showWelcomePageAction); preferencesMenu->addAction(stopCompileMessageAction); diff --git a/src/PinAssignment/PinAssignmentBaseView.cpp b/src/PinAssignment/PinAssignmentBaseView.cpp index 9f8150671..0c6256ec0 100644 --- a/src/PinAssignment/PinAssignmentBaseView.cpp +++ b/src/PinAssignment/PinAssignmentBaseView.cpp @@ -109,7 +109,9 @@ void PinAssignmentBaseView::insertCombo(QComboBox *combo, } void PinAssignmentBaseView::removeFromList(QObject *obj) { - m_allCombo.remove(qobject_cast(obj)); + // Bug: qobject_cast returns 0 now the type is ComboBox + // Use brute force cast for now. + m_allCombo.remove((QComboBox *)obj); } } // namespace FOEDAG