Git commit 9f83ec0a9b32ae9b2426cad247309970527780d6 by Sven Langkamp. Committed on 18/06/2016 at 13:33. Pushed by langkamp into branch 'master'. Fix preset layout after tag change and hide the scrollbar in the preset str= ip M +3 -0 libs/ui/widgets/kis_preset_chooser.cpp M +0 -2 libs/ui/widgets/kis_preset_selector_strip.cpp M +1 -0 libs/widgets/KoResourceItemChooser.cpp M +1 -0 libs/widgets/KoResourceTaggingManager.cpp M +3 -0 libs/widgets/KoResourceTaggingManager.h http://commits.kde.org/krita/9f83ec0a9b32ae9b2426cad247309970527780d6 diff --git a/libs/ui/widgets/kis_preset_chooser.cpp b/libs/ui/widgets/kis_p= reset_chooser.cpp index 254cf73..d3ab69b 100644 --- a/libs/ui/widgets/kis_preset_chooser.cpp +++ b/libs/ui/widgets/kis_preset_chooser.cpp @@ -37,6 +37,7 @@ #include #include #include +#include "KoResourceItemView.h" = #include #include @@ -242,6 +243,8 @@ void KisPresetChooser::updateViewSettings() } else if (m_mode =3D=3D STRIP) { m_chooser->setSynced(false); m_chooser->setRowCount(1); + m_chooser->itemView()->setHorizontalScrollBarPolicy(Qt::ScrollBarA= lwaysOff); + m_chooser->itemView()->setVerticalScrollBarPolicy(Qt::ScrollBarAlw= aysOff); // An offset of 7 keeps the cell exactly square, TODO: use constan= ts, not hardcoded numbers m_chooser->setColumnWidth(m_chooser->viewSize().height() - 7); m_delegate->setShowText(false); diff --git a/libs/ui/widgets/kis_preset_selector_strip.cpp b/libs/ui/widget= s/kis_preset_selector_strip.cpp index eb46793..01aa807 100644 --- a/libs/ui/widgets/kis_preset_selector_strip.cpp +++ b/libs/ui/widgets/kis_preset_selector_strip.cpp @@ -35,8 +35,6 @@ KisPresetSelectorStrip::KisPresetSelectorStrip(QWidget* p= arent) smallPresetChooser->showButtons(false); smallPresetChooser->setViewMode(KisPresetChooser::STRIP); m_resourceItemView =3D smallPresetChooser->itemChooser()->itemView(); - m_resourceItemView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOf= f); - m_resourceItemView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); = /* This is an heuristic to fill smallPresetChooser with only the prese= ts * for the paintop that comes selected by default: Pixel Brush. */ diff --git a/libs/widgets/KoResourceItemChooser.cpp b/libs/widgets/KoResour= ceItemChooser.cpp index a75be10..147900c 100644 --- a/libs/widgets/KoResourceItemChooser.cpp +++ b/libs/widgets/KoResourceItemChooser.cpp @@ -173,6 +173,7 @@ KoResourceItemChooser::KoResourceItemChooser(QSharedPoi= nterviewModeButton->setVisible(false); = d->tagManager =3D new KoResourceTaggingManager(d->model, this); + connect(d->tagManager, SIGNAL(updateView()), this, SLOT(updateView())); = layout->addWidget(d->tagManager->tagChooserWidget(), 0, 0); layout->addWidget(d->viewModeButton, 0, 1); diff --git a/libs/widgets/KoResourceTaggingManager.cpp b/libs/widgets/KoRes= ourceTaggingManager.cpp index 9a86efa..b0a222c 100644 --- a/libs/widgets/KoResourceTaggingManager.cpp +++ b/libs/widgets/KoResourceTaggingManager.cpp @@ -295,6 +295,7 @@ void KoResourceTaggingManager::updateTaggedResourceView= () d->model->setCurrentTag(d->currentTag); d->model->updateServer(); d->originalResources =3D d->model->currentlyVisibleResources(); + emit updateView(); } = void KoResourceTaggingManager::tagChooserIndexChanged(const QString& lineE= ditText) diff --git a/libs/widgets/KoResourceTaggingManager.h b/libs/widgets/KoResou= rceTaggingManager.h index 8d1a8f3..8d1f626 100644 --- a/libs/widgets/KoResourceTaggingManager.h +++ b/libs/widgets/KoResourceTaggingManager.h @@ -59,6 +59,9 @@ public: KoTagFilterWidget* tagFilterWidget(); KoTagChooserWidget* tagChooserWidget(); = +Q_SIGNALS: + void updateView(); + = private Q_SLOTS: = void undeleteTag(const QString& tagToUndelete);