Commit 50b1f11b authored by Anna Medonosová's avatar Anna Medonosová

Fix selecting color from combo box in palette docker

BACKPORT:krita/4.2
parent e4c9d162
......@@ -67,8 +67,6 @@ void KisPaletteComboBox::setCompanionView(KisPaletteView *view)
setPaletteModel(view->paletteModel());
connect(view, SIGNAL(sigIndexSelected(QModelIndex)),
SLOT(slotSwatchSelected(QModelIndex)));
connect(this, SIGNAL(sigColorSelected(KoColor)),
view, SLOT(slotSelectColor(KoColor)));
}
void KisPaletteComboBox::slotPaletteChanged()
......
......@@ -223,11 +223,6 @@ void KisPaletteView::slotFGColorResourceChanged(const KoColor& color)
slotFGColorChanged(color);
}
void KisPaletteView::slotSelectColor(const KoColor &color)
{
selectClosestColor(color);
}
void KisPaletteView::setPaletteModel(KisPaletteModel *model)
{
if (m_d->model) {
......
......@@ -110,12 +110,6 @@ public Q_SLOTS:
*/
void slotFGColorResourceChanged(const KoColor& color);
/**
* Slot that selects the right index for provided color.
* Called from KisPaletteComboBox when user selects color in the dropdown.
*/
void slotSelectColor(const KoColor& color);
void slotScrollerStateChanged(QScroller::State state){KisKineticScroller::updateCursor(this, state);}
private Q_SLOTS:
......
......@@ -109,6 +109,7 @@ PaletteDockerDock::PaletteDockerDock( )
SLOT(slotPaletteIndexClicked(QModelIndex)));
connect(m_ui->paletteView, SIGNAL(doubleClicked(QModelIndex)),
SLOT(slotPaletteIndexDoubleClicked(QModelIndex)));
connect(m_ui->cmbNameList, SIGNAL(sigColorSelected(const KoColor&)), SLOT(slotNameListSelection(const KoColor&)));
m_viewContextMenu.addAction(m_actModify.data());
m_viewContextMenu.addAction(m_actRemove.data());
......@@ -377,6 +378,7 @@ void PaletteDockerDock::slotEditEntry()
void PaletteDockerDock::slotNameListSelection(const KoColor &color)
{
m_colorSelfUpdate = true;
m_ui->paletteView->selectClosestColor(color);
m_resourceProvider->setFGColor(color);
m_colorSelfUpdate = false;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment