mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
Revamp code
Change the way to know who is the physical terminal of a real terminal when we got only the real terminal.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
#include "groupterminalscommand.h"
|
||||
#include "../physicalterminal.h"
|
||||
#include "../realterminal.h"
|
||||
|
||||
/**
|
||||
* @brief GroupTerminalsCommand::GroupTerminalsCommand
|
||||
@@ -87,8 +88,7 @@ void UnGroupTerminalsCommand::setUp(const QVector<QSharedPointer<RealTerminal>>
|
||||
{
|
||||
for (const auto &rt_ : to_ungroup)
|
||||
{
|
||||
auto phy_t = m_terminal_strip->physicalTerminal(rt_);
|
||||
if (phy_t)
|
||||
if (auto phy_t = rt_->physicalTerminal())
|
||||
{
|
||||
//Physical have only one real terminal, no need to ungroup it
|
||||
if (phy_t->realTerminalCount() <= 1) {
|
||||
|
||||
Reference in New Issue
Block a user