optimize create efficiency
This commit is contained in:
parent
23527be14b
commit
0aac4c42c3
|
|
@ -28,7 +28,7 @@ BaseDrawingPanel::BaseDrawingPanel(PowerEntity* pEntity,QWidget *parent,DiagramM
|
|||
m_pSelectorManager = new SelectorManager(_pModel,this);
|
||||
m_pGraphicsScene = new DesignerScene(_pModel,this);
|
||||
//设置场景大小.前两个参数为scene的坐标远点,设置到view的中心点后,无论view如何缩放,secne的坐标原点都不会动,方便后续的位置计算
|
||||
m_pGraphicsScene->setSceneRect(0,0, Constants::SCENE_WIDTH*4, Constants::SCENE_HEIGHT*4);
|
||||
m_pGraphicsScene->setSceneRect(0,0, Constants::SCENE_WIDTH*6, Constants::SCENE_HEIGHT*6);
|
||||
m_pGraphicsScene->setGridVisible(true);
|
||||
|
||||
m_pGraphicsView = new DesignerView(this);
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ GraphicsFunctionModelItem* FixedPortsModel::addNodeItem(QUuid id,QPointF pos,dou
|
|||
QString sMeta = pro->metaModelName();
|
||||
QString sProModel = pro->modelName();
|
||||
|
||||
ModelDataInfo mapValue = DataManager::instance().modelData()[sProModel];
|
||||
ModelDataInfo mapValue = DataManager::instance().modelData(true)[sProModel];
|
||||
PropertyValueInfo valueInfo; //属性组设置的数据 (ct,pt二次绕组)
|
||||
if(mapValue.groupInfo.contains("base_extend"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -417,11 +417,11 @@ bool ElectricFunctionModelConnectLineItem::isSegmentSafe(const QPointF& p1, cons
|
|||
bool ElectricFunctionModelConnectLineItem::isPathSafe(const QList<QPointF>& path,
|
||||
const QList<QRectF>& components)
|
||||
{
|
||||
for (int i = 0; i < path.size() - 1; i++) {
|
||||
/*for (int i = 0; i < path.size() - 1; i++) {
|
||||
if (!isSegmentSafe(path[i], path[i+1], components)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ CMainWindow::~CMainWindow()
|
|||
if(m_pElectricElementsBox)
|
||||
delete m_pElectricElementsBox;
|
||||
if(m_pPropertiesEditorView){
|
||||
auto pView = m_pPropertiesEditorView->getQuickDetailsView();
|
||||
if(pView){
|
||||
pView->disconnect();
|
||||
delete pView;
|
||||
}
|
||||
m_pPropertiesEditorView->deleteLater();
|
||||
}
|
||||
if(m_pRuntimeDlg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue