Skip to content

Commit

Permalink
Merge pull request #530 from ra3xdh/422-netmames-not-moved
Browse files Browse the repository at this point in the history
Fix selection of wirelabel
  • Loading branch information
ra3xdh authored Feb 5, 2024
2 parents bca09c2 + a96c19c commit 1edf39e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif()
file (STRINGS "${qucs-suite_SOURCE_DIR}/VERSION" QUCS_VERSION)
message(STATUS "Configuring Qucs: VERSION ${QUCS_VERSION}")

set(GIT unknown)
set(GIT "")
if(EXISTS ${CMAKE_SOURCE_DIR}/.git )
find_package(Git)
# Get the latest abbreviated commit hash of the working branch
Expand Down
2 changes: 1 addition & 1 deletion qucs/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ QString misc::getWindowTitle()
}
#if defined(GIT)
QString hash = GIT;
if (hash != "unknown") {
if (!hash.isEmpty()) {
title = title + "-" + hash;
}
#endif
Expand Down
6 changes: 4 additions & 2 deletions qucs/schematic_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,8 @@ int Schematic::selectElements(int x1, int y1, int x2, int y2, bool append, bool
for (pw = Wires->first(); pw != nullptr; pw = Wires->next()) {
if (pw->Label) {
pl = pw->Label;
QRect componentRect(pl->x1, pl->y1, pl->x2 - pl->x1, pl->y2 - pl->y1);
pl->getLabelBounding(cx1,cy1,cx2,cy2);
QRect componentRect(cx1, cy1, cx2 - cx1, cy2 - cy1);
if (shouldBeSelected(componentRect, selectionRect, entirely)) {
pl->isSelected = true;
z++;
Expand All @@ -1564,7 +1565,8 @@ int Schematic::selectElements(int x1, int y1, int x2, int y2, bool append, bool
for (Node *pn = Nodes->first(); pn != nullptr; pn = Nodes->next()) {
pl = pn->Label;
if (pl) {
QRect componentRect(pl->x1, pl->y1, pl->x2 - pl->x1, pl->y2 - pl->y1);
pl->getLabelBounding(cx1,cy1,cx2,cy2);
QRect componentRect(cx1, cy1, cx2 - cx1, cy2 - cy1);
if (shouldBeSelected(componentRect, selectionRect, entirely)) {
pl->isSelected = true;
z++;
Expand Down

0 comments on commit 1edf39e

Please sign in to comment.