We can save user's changes in measurement's full name immediately.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-01 16:56:05 +02:00
parent d24390bd98
commit 49dc9f7700
2 changed files with 3 additions and 5 deletions

View File

@ -1211,10 +1211,9 @@ void TMainWindow::ShowMData()
ShowMDiagram(meash->GetName()); ShowMDiagram(meash->GetName());
// Don't block all signal for QLineEdits. Need for correct handle with clear button. // Don't block all signal for QLineEdit. Need for correct handle with clear button.
disconnect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName); disconnect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName);
ui->plainTextEditDescription->blockSignals(true); ui->plainTextEditDescription->blockSignals(true);
disconnect(ui->lineEditFullName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMFullName);
if (meash->IsCustom()) if (meash->IsCustom())
{ {
ui->plainTextEditDescription->setPlainText(meash->GetDescription()); ui->plainTextEditDescription->setPlainText(meash->GetDescription());
@ -1230,7 +1229,6 @@ void TMainWindow::ShowMData()
} }
connect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName); connect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName);
ui->plainTextEditDescription->blockSignals(false); ui->plainTextEditDescription->blockSignals(false);
connect(ui->lineEditFullName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMFullName);
if (mType == MeasurementsType::Standard) if (mType == MeasurementsType::Standard)
{ {
@ -1905,7 +1903,7 @@ void TMainWindow::InitWindow()
connect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName); connect(ui->lineEditName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMName);
connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &TMainWindow::SaveMDescription); connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &TMainWindow::SaveMDescription);
connect(ui->lineEditFullName, &QLineEdit::editingFinished, this, &TMainWindow::SaveMFullName); connect(ui->lineEditFullName, &QLineEdit::textEdited, this, &TMainWindow::SaveMFullName);
connect(ui->pushButtonShowInExplorer, &QPushButton::clicked, this, &TMainWindow::ShowInGraphicalShell); connect(ui->pushButtonShowInExplorer, &QPushButton::clicked, this, &TMainWindow::ShowInGraphicalShell);

View File

@ -47,7 +47,7 @@
<string/> <string/>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tabMeasurements"> <widget class="QWidget" name="tabMeasurements">
<attribute name="icon"> <attribute name="icon">