From e6bbaabde4a1403dae5b1de8f866a21e613f75b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borna=20Rajkovi=C4=87?= Date: Sun, 12 Jun 2022 13:43:35 +0200 Subject: [PATCH] Added antialiasing --- comdel/display/component_display.cpp | 2 +- comdel/display/schema_display.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/comdel/display/component_display.cpp b/comdel/display/component_display.cpp index 33b7cc5..ad2ed10 100644 --- a/comdel/display/component_display.cpp +++ b/comdel/display/component_display.cpp @@ -95,7 +95,7 @@ namespace display { } } } - } else { + } else if(!pinConnections.empty()) { auto pinConnection = pinConnections[0]; if(auto busConnection = dynamic_cast(pinConnection)) { menu.addSection(QString::fromStdString(busConnection->bus->name)); diff --git a/comdel/display/schema_display.cpp b/comdel/display/schema_display.cpp index b49c253..defaa68 100644 --- a/comdel/display/schema_display.cpp +++ b/comdel/display/schema_display.cpp @@ -13,6 +13,8 @@ namespace display { Schema::Schema() { schema = nullptr; library = std::nullopt; + setRenderHint(QPainter::Antialiasing); + setAlignment(Qt::AlignCenter); this->setScene(&scene); this->setAcceptDrops(true); }