mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Fix intensive call of updateUi when move a QetGraphicsTableItem
This commit is contained in:
@@ -91,11 +91,11 @@ void GraphicsTablePropertiesEditor::setTable(QetGraphicsTableItem *table)
|
||||
m_connect_list << connect(m_table_item.data(),
|
||||
&QetGraphicsTableItem::xChanged,
|
||||
this,
|
||||
&GraphicsTablePropertiesEditor::updateUi);
|
||||
&GraphicsTablePropertiesEditor::updatePosWidget);
|
||||
m_connect_list << connect(m_table_item.data(),
|
||||
&QetGraphicsTableItem::yChanged,
|
||||
this,
|
||||
&GraphicsTablePropertiesEditor::updateUi);
|
||||
&GraphicsTablePropertiesEditor::updatePosWidget);
|
||||
|
||||
|
||||
if (auto editor = PropertiesEditorFactory::propertiesEditor(table->model(), this))
|
||||
@@ -390,6 +390,12 @@ void GraphicsTablePropertiesEditor::updateUi()
|
||||
setUpEditConnection();
|
||||
}
|
||||
|
||||
void GraphicsTablePropertiesEditor::updatePosWidget()
|
||||
{
|
||||
ui->m_x_pos->setValue(m_table_item->pos().x());
|
||||
ui->m_y_pos->setValue(m_table_item->pos().y());
|
||||
}
|
||||
|
||||
void GraphicsTablePropertiesEditor::updateInfoLabel()
|
||||
{
|
||||
auto table_ = m_table_item;
|
||||
|
||||
@@ -53,6 +53,7 @@ class GraphicsTablePropertiesEditor : public PropertiesEditorWidget
|
||||
void on_m_header_font_pb_clicked();
|
||||
void on_m_table_font_pb_clicked();
|
||||
virtual void updateUi() override;
|
||||
void updatePosWidget();
|
||||
void updateInfoLabel();
|
||||
void on_m_table_name_le_textEdited(const QString &arg1);
|
||||
void on_m_previous_table_cb_activated(int index);
|
||||
|
||||
Reference in New Issue
Block a user