From b52507715660e059f029f75db71ad80daa00c847 Mon Sep 17 00:00:00 2001 From: peri4 Date: Wed, 20 Jul 2022 11:14:30 +0300 Subject: [PATCH] blockview #22 #25 --- libs/blockview/blockview.cpp | 6 ++++-- utils/piintrospector/piintrospector.cpp | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libs/blockview/blockview.cpp b/libs/blockview/blockview.cpp index 76c9a7b..d333b02 100644 --- a/libs/blockview/blockview.cpp +++ b/libs/blockview/blockview.cpp @@ -293,7 +293,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) { return true; } if (mm_ci) { - if ((mm_ci->data(bvidType).toInt() == bvitPin) && m_connect && !me->modifiers().testFlag(Qt::ControlModifier)) { + if ((mm_ci->data(bvidType).toInt() == bvitPin) && m_connect) { if (qgraphicsitem_cast(mm_ci)->state() == BlockItemPin::Hover) { trace_from = mm_ci->scenePos(); qgraphicsitem_cast(mm_ci)->clearStateStack(); @@ -318,8 +318,8 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) { wavetrace.setPreferredDirection(BlockViewWavetrace::Horizontal); else wavetrace.setPreferredDirection(BlockViewWavetrace::Vertical); - return true; } + return true; } } cur_scl = qSqrt(transform().determinant()); @@ -1740,6 +1740,8 @@ void BlockView::newBranchAccept(BlockBusItem * item) { tmp_bus.hide(); if (tmp_bus.pol.size() < 2) return; tmp_bus.pol.pop_front(); + if ((tmp_bus.pol.size() == 1) && (tmp_bus.pol[0] == item->press_pos)) + return; int np = item->addPoint(item->press_pos); if (np < 0) return; if (match_bus) { diff --git a/utils/piintrospector/piintrospector.cpp b/utils/piintrospector/piintrospector.cpp index 5b9565c..aac5f2d 100644 --- a/utils/piintrospector/piintrospector.cpp +++ b/utils/piintrospector/piintrospector.cpp @@ -107,16 +107,16 @@ void QPIIntrospector::buildDumpSection(QTreeWidgetItem * pi, PIString & str) { void QPIIntrospector::showInfo() { PIString s; - s << info.execCommand << "\n"; - s << info.execDateTime.toString() << "\n"; - s << info.OS_name << "(" << info.OS_version << ", " << info.architecture << ")\n"; - s << info.user << "\n"; - s << info.build_options.join(", ") << "\n"; - s << "\n"; - s << "load k: " << PIString::fromNumber(stat.proc.cpu_load_system, 'f', 2) << " %\n"; - s << "load u: " << PIString::fromNumber(stat.proc.cpu_load_user, 'f', 2) << " %\n"; - s << "threads: " << stat.proc.threads << "\n"; - s << "memory usage: " << stat.proc.physical_memsize_readable; + s += info.execCommand + "\n"; + s += info.execDateTime.toString() + "\n"; + s += info.OS_name + "(" + info.OS_version + ", " + info.architecture + ")\n"; + s += info.user + "\n"; + s += info.build_options.join(", ") + "\n"; + s += "\n"; + s += "load k: " + PIString::fromNumber(stat.proc.cpu_load_system, 'f', 2) + " %\n"; + s += "load u: " + PIString::fromNumber(stat.proc.cpu_load_user, 'f', 2) + " %\n"; + s += "threads: " + PIString::fromNumber(stat.proc.threads) + "\n"; + s += "memory usage: " + stat.proc.physical_memsize_readable; labelInfo->setText(PI2QString(s)); int tlic = treeStat->topLevelItemCount(); for (int i = tlic; i < stat.threads.size_s(); ++i)