--- a/src/widgets/colorindexinput.cpp Wed Jun 22 23:32:34 2022 +0300 +++ b/src/widgets/colorindexinput.cpp Wed Jun 22 23:51:06 2022 +0300 @@ -3,11 +3,12 @@ #include "colorselectdialog.h" #include "uiutilities.h" -ColorIndexInput::ColorIndexInput(ColorTable *colorTable, ColorIndex color, QWidget *parent) : +ColorIndexInput::ColorIndexInput(QWidget *parent) : QWidget{parent}, - colorTable{colorTable}, ui{*new Ui_ColorIndexInput} { + static const ColorTable emptyColorTable; + this->colorTable = &emptyColorTable; this->ui.setupUi(this); connect(this->ui.button, &QPushButton::clicked, [this]() { @@ -28,7 +29,7 @@ } Q_EMIT this->colorChanged({value}); }); - this->ui.index->setValue(color.index); + this->ui.index->setValue(MAIN_COLOR.index); } ColorIndexInput::~ColorIndexInput()