mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 02:10:52 +01:00
Improve opening time of terminal strip editor window
Need serious refactoring of codes who use the method Element::actualLabel() and also actualLabel itself. This part of code is crappy.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "../../utils/qetutils.h"
|
||||
#include "../../qetgraphicsitem/terminalelement.h"
|
||||
#include "../realterminal.h"
|
||||
#include "../../qetinformation.h"
|
||||
|
||||
const int LABEL_CELL = 0;
|
||||
const int XREF_CELL = 1;
|
||||
@@ -310,7 +311,8 @@ void FreeTerminalModel::fillTerminalVector()
|
||||
std::sort(free_terminal_vector.begin(), free_terminal_vector.end(),
|
||||
[](TerminalElement *a, TerminalElement *b)
|
||||
{
|
||||
return QETUtils::sortBeginIntString(a->actualLabel(), b->actualLabel());
|
||||
return QETUtils::sortBeginIntString(a->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString(),
|
||||
b->elementData().m_informations.value(QETInformation::ELMT_LABEL).toString());
|
||||
});
|
||||
|
||||
for (const auto &terminal_ : free_terminal_vector) {
|
||||
|
||||
Reference in New Issue
Block a user