Commit d0ced0f1 authored by Saurabh  Kumar's avatar Saurabh Kumar 😌 Committed by Agata Cacko

Delete slotAddPalette as it was unconnected

parent d25b10a4
......@@ -206,7 +206,7 @@ void KisToolColorPicker::endPrimaryAction(KoPointerEvent *event)
KoColorSet *palette = m_palettes.at(m_optionsWidget->cmbPalette->currentIndex());
palette->add(swatch);
if (!palette->save()) {
QMessageBox::critical(0, i18nc("@title:window", "Krita"), i18n("Cannot write to palette file %1. Maybe it is read-only.", palette->filename()));
}
......@@ -365,16 +365,7 @@ void KisToolColorPicker::slotSetColorSource(int value)
{
m_config->sampleMerged = value == SAMPLE_MERGED;
}
/*
void KisToolColorPicker::slotAddPalette(KoResource *resource)
{
KoColorSet *palette = dynamic_cast<KoColorSet*>(resource);
if (palette) {
m_optionsWidget->cmbPalette->addSqueezedItem(palette->name());
m_palettes.append(palette);
}
}
*/
void KisToolColorPicker::unsetResourceServer()
{
KoResourceServer<KoColorSet> *srv = KoResourceServerProvider::instance()->paletteServer();
......@@ -382,7 +373,8 @@ void KisToolColorPicker::unsetResourceServer()
}
void KisToolColorPicker::resourceAdded(KoColorSet* resource){
if( !resource || !m_optionsWidget || m_palettes.contains(resource)) return;
if(!resource || !m_optionsWidget) return;
if(m_palettes.contains(resource)) return;
if(m_config->addColorToCurrentPalette){
updateCmbPalette();
......@@ -390,7 +382,8 @@ void KisToolColorPicker::resourceAdded(KoColorSet* resource){
}
void KisToolColorPicker::removingResource(KoColorSet* resource){
if(!resource || !m_optionsWidget || !m_palettes.contains(resource)) return;
if(!resource || !m_optionsWidget) return;
if(!m_palettes.contains(resource)) return;
if(m_config->addColorToCurrentPalette){
updateCmbPalette();
......
......@@ -106,7 +106,6 @@ public Q_SLOTS:
void slotSetAddPalette(bool);
void slotChangeRadius(int);
void slotChangeBlend(int);
//void slotAddPalette(KoResource* resource);
void slotSetColorSource(int value);
private:
......
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