Minor : search and replace widget, clear the tree widget when the current searched project is closed.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5571 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-10-27 13:31:52 +00:00
parent b83aa74485
commit 8e250bd569
2 changed files with 8 additions and 1 deletions

View File

@@ -225,9 +225,13 @@ void SearchAndReplaceWidget::fillItemsList()
m_element_hash.clear(); m_element_hash.clear();
QETProject *project_ = m_editor->currentProject(); QETProject *project_ = m_editor->currentProject();
if (!project_) { if (!project_)
{
ui->m_replace_all_pb->setDisabled(true);
return; return;
} }
ui->m_replace_all_pb->setEnabled(true);
connect(project_, &QETProject::destroyed, this, &SearchAndReplaceWidget::on_m_reload_pb_clicked);
DiagramContent dc; DiagramContent dc;

View File

@@ -238,6 +238,9 @@
</item> </item>
<item row="2" column="6" colspan="2"> <item row="2" column="6" colspan="2">
<widget class="QPushButton" name="m_replace_all_pb"> <widget class="QPushButton" name="m_replace_all_pb">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Remplacer les correspondances coché</string> <string>Remplacer les correspondances coché</string>
</property> </property>