From 3eae445eadb3218d4af307e54287d68365783682 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 29 Mar 2019 11:37:26 -0400 Subject: [PATCH] [partition] Don't signal changes from model before they're done - clear() signals modelReset(), which is true, but inconvenient when we do a bunch of changes afterwards. Block signals, and rely on own signaling when all of the changes are done. - Keep blocking signals while updating the model, since the row appends otherwise trigger a change in the connected combo box. --- src/modules/partition/core/BootLoaderModel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/partition/core/BootLoaderModel.cpp b/src/modules/partition/core/BootLoaderModel.cpp index 0598a4f31..f0661d8b0 100644 --- a/src/modules/partition/core/BootLoaderModel.cpp +++ b/src/modules/partition/core/BootLoaderModel.cpp @@ -67,6 +67,8 @@ BootLoaderModel::createMbrItems() void BootLoaderModel::update() { + beginResetModel(); + blockSignals( true ); clear(); createMbrItems(); @@ -111,6 +113,8 @@ BootLoaderModel::update() createBootLoaderItem( tr( "Do not install a boot loader" ), QString(), false ) ); } + blockSignals( false ); + endResetModel(); }