Permalink
Browse files

Fix crashes when assembly record number changed

  • Loading branch information...
1 parent 0152ac5 commit c01fb52e33c0dc59d0d42d8c2db4377a106ec143 @matus-tomlein matus-tomlein committed Jan 2, 2012
Showing with 4 additions and 6 deletions.
  1. +1 −5 src/edit_dialogue_table_groups.cpp
  2. +3 −1 src/edit_inspection_dialogue_assembly_record_tab.cpp
View
6 src/edit_dialogue_table_groups.cpp
@@ -96,11 +96,7 @@ QList<MTDictionary> EditDialogueGroupsLayout::allValues()
void EditDialogueGroupsLayout::clear()
{
- QMapIterator<QString, EditDialogueAdvancedTable *> i(*groups);
- while (i.hasNext()) {
- i.next();
- delete groups->take(i.key());
- }
+ groups->clear();
}
EditDialogueGroupHeaderItem::EditDialogueGroupHeaderItem(int id, const QString & name, const QString & full_name, int data_type)
View
4 src/edit_inspection_dialogue_assembly_record_tab.cpp
@@ -27,6 +27,7 @@
#include "mtsqlquery.h"
#include <QMessageBox>
+#include <QApplication>
EditInspectionDialogueAssemblyRecordTab::EditInspectionDialogueAssemblyRecordTab(int, MDLineEdit * arno_w, MDComboBox * ar_type_w, const QString & customer_id, const QString & circuit_id, QWidget * parent)
: EditDialogueTab(parent),
@@ -363,11 +364,12 @@ void EditInspectionDialogueAssemblyRecordTab::assemblyRecordNumberChanged()
ar_type_w->setVariantValue(query.value(1).toInt());
loadItemInputWidgets();
break;
- case 1: // Cancel
+ default: // Cancel
arno_w->setText(current_arno);
break;
}
}
arno_being_changed = false;
+ QApplication::processEvents();
}

0 comments on commit c01fb52

Please sign in to comment.