[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.
This commit is contained in:
Adriaan de Groot 2019-03-29 11:37:26 -04:00
parent dc04aa999d
commit 3eae445ead

View File

@ -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();
}