Commit af204e33 authored by C. Boemann's avatar C. Boemann

Fix crash in Stage when clicking on a place holder

it was due to a bug in KomodeBux where using [] operator caused a value to be inserted that shouldn't be
parent a1580bcc
......@@ -235,9 +235,8 @@ void KoModeBox::setActiveTool(KoCanvasController *canvas, int id)
{
if (canvas->canvas() == d->canvas) {
// Clear the minimumSize instigated by the previous tool
// Yhe new minimumSize will be set in updateShownTools()
QWidget *w = d->addedWidgets[d->activeId];
if (w) {
// The new minimumSize will be set in updateShownTools()
if (d->addedWidgets.contains(d->activeId)) {
ScrollArea *sa = qobject_cast<ScrollArea *>(d->addedWidgets[d->activeId]->parentWidget()->parentWidget());
sa->setMinimumWidth(0);
sa->setMinimumHeight(0);
......@@ -422,7 +421,6 @@ void KoModeBox::updateShownTools(const KoCanvasController *canvas, const QList<Q
&& !button.section.contains("main")) {
continue;
}
if (code.startsWith(QLatin1String("flake/"))) {
addItem(button);
continue;
......
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