Changing submit policy of QDataWidgetMapper to AutoSubmit because if multiple changes are made at once not all of them are applied.
This commit is contained in:
@ -15,7 +15,14 @@ ItemDetailMapper::ItemDetailMapper(QWidget* parent)
|
||||
: QWidget{parent} {
|
||||
/// model mapping
|
||||
m_mapper = std::make_unique<QDataWidgetMapper>(this);
|
||||
m_mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
||||
/// BUG: If multiple columns are changed not all changes are applied.
|
||||
/// Multiple changes are set individually by calling setData().
|
||||
/// Probably due to a conflicting dataChanged signal for too many roles&columns the data of
|
||||
/// the remaining columns is reset before setData is called.
|
||||
/// And a manual submit would also create multiple undo steps anyway.
|
||||
/// Workaround: ManualSubmit -> AutoSubmit
|
||||
// m_mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
||||
m_mapper->setSubmitPolicy(QDataWidgetMapper::AutoSubmit);
|
||||
|
||||
/// model mapping buttons
|
||||
m_nextButton = new QPushButton(tr("Ne&xt"));
|
||||
|
||||
Reference in New Issue
Block a user