fixed variable type change during text import bug #58298
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sat, 6 Jun 2020 19:00:53 +0000 (21:00 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sat, 6 Jun 2020 19:26:24 +0000 (21:26 +0200)
commitdf3728b28df255a1bef368985a9185c221143168
tree2f7d5297681e29e11ea0ad0d912c193268d59932
parentcc138b64bf7374d722b043d65c6d55d2b8f2c3bb
fixed variable type change during text import bug #58298

Changing the variable type during the import dialog resulted
in a crash. The reason is that the import data is stored as
strings in a treeview and converted to union value depending
on the variable type. When the variable type is changed, there
is a discrepancy between then caseproto in the reader and the
variable. This results in an assertion.

As a fix I store the dictionary at the time of creation of the
casereader. When a variable is changed i reinitialize the
casereader.
src/ui/gui/psppire-import-assistant.c
src/ui/gui/psppire-import-assistant.h