Commit 4e533008 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix crash when clicking on a mask

Fix remembering settings when choosing a preset
Fix crash on shutdown

svn path=/trunk/koffice/; revision=882960
parent 38b44075
......@@ -123,22 +123,91 @@ QImage KisPaintOpPreset::img() const
void KisPaintOpPreset::updateImg()
{
if (!m_d->settings) return;
Q_ASSERT(!m_d->settings->getString("paintop").isNull());
if (m_d->settings->getString("paintop").isNull()) return;
KisPaintDeviceSP dev = new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8(), "paintop_preset");
KisPainter gc(dev);
gc.setPaintOpPreset(this);
KisPaintInformation i1(QPointF(0, 25), PRESSURE_MIN);
KisPaintInformation i2(QPointF(50, 25), PRESSURE_MAX);
KisPaintInformation i3(QPointF(100, 25), PRESSURE_MIN);
gc.paintBezierCurve(i1, QPointF(25, 0), QPointF(25, 0), i2);
gc.paintBezierCurve(i2, QPointF(75, 0), QPointF(75, 0), i3);
gc.end();
#if 0 // XXX: port to KisPaintOpPreset
const KoColorSpace * cs = KoColorSpaceRegistry::instance()->rgb8();
KisPaintDeviceSP mydevice = new KisPaintDevice(cs, "preview device");
Q_CHECK_PTR(mydevice);
KisPainter painter(mydevice);
KoColor c(Qt::black, cs);
painter.setPaintColor(c);
KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("sumibrush", this, &painter);
painter.setPaintOp(op);
QLabel *label = m_options->previewLbl;
int width = label->width();
int height = label->height();
/* QPointF p1(0,0);
KisPaintInformation pi1(p1, 0.5);
QPointF p2(width,height);
KisPaintInformation pi2(p2, 1.0);
painter.paintLine(pi1,pi2);*/
painter.end();
QPointF p1(1.0 / 6.0*width, 2.0 / 3.0*height);
QPointF p2(2.0 / 6.0*width, 1.0 / 3.0*height);
QPointF p3(4.0 / 6.0*width, 2.0 / 3.0*height);
QPointF p4(5.0 / 6.0*width, 1.0 / 3.0*height);
float pathLength;
//p2-p1
float dx = p2.x() - p1.x();
float dy = p2.y() - p1.y();
pathLength += sqrt(dx * dx + dy * dy);
dx = p3.x() - p2.x();
dy = p3.y() - p2.y();
pathLength += sqrt(dx * dx + dy * dy);
dx = p4.x() - p3.x();
dy = p4.y() - p3.y();
pathLength += sqrt(dx * dx + dy * dy);
m_options->inkAmountSpinBox->setValue((int)pathLength);
KisPaintInformation pi1(p1, 0.0);
KisPaintInformation pi2(p2, 0.95);
KisPaintInformation pi3(p3, 0.75);
KisPaintInformation pi4(p4, 0.0);
QPointF c1(p1.x(), p1.y() - 5);
QPointF c2(p1.x(), p1.y() + 5);
painter.paintBezierCurve(pi1, c1, c2, pi2, 0);
c1.setX(p2.x());
c1.setY(p2.y() - 5);
c2.setX(p2.x());
c2.setY(p2.y() + 5);
painter.paintBezierCurve(pi2, c1, c2, pi3, 0);
c1.setX(p3.x());
c1.setY(p3.y() - 5);
c2.setX(p3.x());
c2.setY(p3.y() + 5);
painter.paintBezierCurve(pi3, c1, c2, pi4, 0);
qint32 xx = 0,
yy = 0,
ww = 0,
hh = 0;
mydevice->extent(xx, yy, ww, hh);
/* dbgPlugins << "Coords extend()";
dbgPlugins << xx << " " << yy << " " << ww << " " << hh;
dbgPlugins << mydevice->extent();*/
QImage img = mydevice->convertToQImage(0, xx, yy, ww, hh);
/* const QString filePath("/tmp/sumi-e-preview.png");
bool r = img.save(filePath);
dbgPlugins << "saved to?: "<< r << " " << filePath;*/
QPixmap pixmap = QPixmap::fromImage(img);
Q_CHECK_PTR(label);
label->setPixmap(pixmap);
#endif
}
......@@ -77,6 +77,8 @@ KisPaintOp * KisPaintOpRegistry::paintOp(const QString & id, const KisPaintOpSet
painter->setBounds(image->bounds());
}
Q_ASSERT( settings );
KisPaintOpFactory* f = value(id);
if (f) {
return f->createOp(settings, painter, image);
......@@ -87,6 +89,8 @@ KisPaintOp * KisPaintOpRegistry::paintOp(const QString & id, const KisPaintOpSet
KisPaintOp * KisPaintOpRegistry::paintOp(const KisPaintOpPresetSP preset, KisPainter * painter, KisImageSP image) const
{
Q_ASSERT(preset);
Q_ASSERT( painter );
Q_ASSERT( image );
if (!preset) return 0;
return paintOp(preset->paintOp().id(), preset->settings(), painter, image);
}
......
......@@ -23,7 +23,7 @@
#include "kis_config_widget.h"
#include <kdebug.h>
/**
* Base class for widgets that are used to edit and display paintop settings
......
......@@ -87,8 +87,10 @@ public:
QIcon icon() const;
KoDocumentSectionModel::PropertyList sectionModelProperties() const;
using KisLayer::setDirty;
virtual void setDirty();
public:
KisFilterConfiguration * filter() const;
......
......@@ -59,8 +59,11 @@ public:
void setFilter(KisFilterConfiguration * filterConfig);
void apply(KisPaintDeviceSP projection, const QRect & rc) const;
using KisNode::setDirty;
virtual void setDirty();
private:
class Private;
......
......@@ -1703,6 +1703,7 @@ void KisPainter::setPaintOpPreset(KisPaintOpPresetSP preset, KisImageSP image)
d->paintOpPreset = preset;
delete d->paintOp;
d->paintOp = KisPaintOpRegistry::instance()->paintOp(preset, this, image);
Q_ASSERT( d->paintOp );
}
KisPaintOpPresetSP KisPainter::preset() const
......
......@@ -6,7 +6,7 @@ add_subdirectory( defaultpaintops )
add_subdirectory( sumie )
#add_subdirectory( chalk )
#add_subdirectory( filterop )
#add_subdirectory( deform )
add_subdirectory( deform )
if( NOT MSVC )
#add_subdirectory( dynamicbrush )
endif( NOT MSVC )
......
......@@ -82,7 +82,6 @@ KisPropertiesConfiguration* KisComplexOpSettingsWidget::configuration() const
void KisComplexOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -66,7 +66,6 @@ KisPropertiesConfiguration* KisAirbrushOpSettingsWidget::configuration() const
void KisAirbrushOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
}
......
......@@ -81,7 +81,6 @@ KisPropertiesConfiguration* KisBrushOpSettingsWidget::configuration() const
void KisBrushOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -73,7 +73,6 @@ KisPropertiesConfiguration* KisDuplicateOpSettingsWidget::configuration() const
void KisDuplicateOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_duplicateOption->writeOptionSetting( config );
......
......@@ -70,7 +70,6 @@ KisPropertiesConfiguration* KisEraseOpSettingsWidget::configuration() const
void KisEraseOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -81,7 +81,6 @@ KisPropertiesConfiguration* KisPenOpSettingsWidget::configuration() const
void KisPenOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -81,7 +81,6 @@ KisPropertiesConfiguration* KisSmudgeOpSettingsWidget::configuration() const
void KisSmudgeOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -81,7 +81,6 @@ KisPropertiesConfiguration* KisBrushOpSettingsWidget::configuration() const
void KisBrushOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_opacityOption->writeOptionSetting(config);
......
......@@ -67,7 +67,6 @@ KisPropertiesConfiguration* KisFilterOpSettingsWidget::configuration() const
void KisFilterOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration *config ) const
{
config->clearProperties();
m_brushOption->writeOptionSetting(config);
m_sizeOption->writeOptionSetting(config);
m_filterOption->writeOptionSetting(config);
......
......@@ -96,9 +96,7 @@ void KisToolBrush::initPaint(KoPointerEvent *e)
// outline?
m_canvas->updateCanvas(); // remove the outline
#endif
m_painter->setPaintOpPreset(currentPaintOpPreset(), currentImage()); // And now the painter owns the op and will destroy it.
if (m_painter->paintOp()->incremental()) {
m_timer->start(m_rate);
}
......
......@@ -84,7 +84,9 @@ void KisDlgAdjustmentLayer::slotNameChanged(const QString & text)
KisFilterConfiguration * KisDlgAdjustmentLayer::filterConfiguration() const
{
return wdgFilterNodeCreation.filterSelector->configuration();
KisFilterConfiguration* config = wdgFilterNodeCreation.filterSelector->configuration();
Q_ASSERT( config );
return config;
}
QString KisDlgAdjustmentLayer::layerName() const
......@@ -96,7 +98,7 @@ void KisDlgAdjustmentLayer::slotConfigChanged()
{
enableButtonOk(1);
m_nodeFilterInterface->setFilter(filterConfiguration());
m_node->setDirty(m_node->extent());
m_node->setDirty();
}
void KisDlgAdjustmentLayer::kickTimer()
......
......@@ -19,7 +19,7 @@
#ifndef KIS_MASK_SHAPE_H_
#define KIS_MASK_SHAPE_H_
#include <KoShape.h>
#include <KoShapeLayer.h>
#include <kis_types.h>
......@@ -40,7 +40,7 @@ class KoShapeContainer;
* by a layer) or channel masks (that contain a single color channel
* extracted from the actual layer).
*/
class KisMaskShape : public KoShape
class KisMaskShape : public KoShapeLayer
{
public:
......
......@@ -37,6 +37,7 @@
#include "kis_config.h"
#include "kis_view2.h"
#include "canvas/kis_canvas2.h"
#include <kis_paintop_settings.h>
KisCanvasResourceProvider::KisCanvasResourceProvider(KisView2 * view)
: m_view(view)
......@@ -152,7 +153,6 @@ KisNodeSP KisCanvasResourceProvider::currentNode() const
KisPaintOpPresetSP KisCanvasResourceProvider::currentPreset() const
{
KisPaintOpPresetSP preset = m_resourceProvider->resource(CurrentPaintOpPreset).value<KisPaintOpPresetSP>();
dbgUI << "current preset: " << preset;
return preset;
}
......@@ -184,7 +184,9 @@ void KisCanvasResourceProvider::slotGradientActivated(KoResource *res)
void KisCanvasResourceProvider::slotPaintOpPresetActivated(const KisPaintOpPresetSP preset)
{
dbgUI << " preset activated: " << preset;
Q_ASSERT( preset->valid() );
Q_ASSERT( !preset->paintOp().id().isEmpty() );
Q_ASSERT( preset->settings() );
if (!preset) return;
QVariant v;
v.setValue(preset);
......
......@@ -262,8 +262,10 @@ void KisLayerManager::updateGUI()
m_imgMergeLayer->setEnabled(nlayers > 1 && layer && layer->nextSibling());
if (activeDevice())
// XXX: Check whether the colorspace was really changed
if (activeDevice()) {
emit currentColorSpaceChanged(activeDevice()->colorSpace());
}
m_imgResizeToLayer->setEnabled(activeLayer());
......
......@@ -235,6 +235,7 @@ void KisMaskManager::createFilterMask(KisNodeSP parent, KisNodeSP above)
KisFilterConfiguration * filter = dlg.filterConfiguration();
QString name = dlg.layerName();
mask->setFilter(filter);
mask->setDirty();
activateMask(mask);
} else {
m_view->image()->removeNode(mask);
......
......@@ -270,8 +270,8 @@ void KisNodeManager::activateNode(KisNodeSP node)
m_d->layerManager->activateLayer(0);
} else {
dbgUI << " activated node: " << node->name() ;
KoShape * shape = m_d->view->document()->shapeForNode(node);
if (!shape) {
shape = m_d->view->document()->addShape(node);
......@@ -282,9 +282,8 @@ void KisNodeManager::activateNode(KisNodeSP node)
parentShape = m_d->view->document()->addShape(node->parent());
}
#endif
selection->select(shape);
KoShapeLayer * shapeLayer = dynamic_cast<KoShapeLayer*>(shape);
Q_ASSERT( shapeLayer );
if (shapeLayer) {
......@@ -292,7 +291,7 @@ void KisNodeManager::activateNode(KisNodeSP node)
shapeLayer->setVisible(node->visible());
selection->setActiveLayer(shapeLayer);
}
m_d->activeNode = node;
if (KisLayerSP layer = dynamic_cast<KisLayer*>(node.data())) {
m_d->maskManager->activateMask(0);
......@@ -303,7 +302,7 @@ void KisNodeManager::activateNode(KisNodeSP node)
m_d->layerManager->activateLayer(static_cast<KisLayer*>(node->parent().data()));
}
emit sigNodeActivated(node);
}
nodesUpdated();
}
......
......@@ -90,7 +90,7 @@ KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name
m_presetWidget->setFixedSize(120, 26);
m_layout->addWidget(m_presetWidget);
m_presetsPopup = new KisPaintOpPresetsPopup(m_presetWidget);
m_presetsPopup = new KisPaintOpPresetsPopup();
m_presetWidget->setPopupWidget(m_presetsPopup);
// XXX: Let's see... Are all paintops loaded and ready?
......@@ -119,6 +119,8 @@ KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name
KisPaintopBox::~KisPaintopBox()
{
// XXX???
m_presetsPopup->setPaintOpSettingsWidget(0);
}
void KisPaintopBox::addItem(const KoID & paintop, const QString & /*category*/)
......@@ -238,29 +240,30 @@ const KoID& KisPaintopBox::currentPaintop()
void KisPaintopBox::setCurrentPaintop(const KoID & paintop)
{
if ( m_activePreset && m_optionWidget ) {
m_optionWidget->writeConfiguration( const_cast<KisPaintOpSettings*>( m_activePreset->settings().data() ) );
}
m_currentID[KoToolManager::instance()->currentInputDevice()] = paintop;
const KisPaintOpPresetSP preset =
KisPaintOpPresetSP preset =
activePreset(currentPaintop(), KoToolManager::instance()->currentInputDevice());
dbgUI << "active preset for paintop " << paintop.id() << " is " << preset;
if (preset != 0 && preset->settings() && preset->settings()->widget()) {
m_optionWidget = preset->settings()->widget();
// XXX: remove this ugliness in 2.1
if ( !preset->settings()->getProperties().isEmpty() ) {
m_optionWidget->setConfiguration(const_cast<KisPaintOpSettings*>(preset->settings().data()));
m_optionWidget->setConfiguration( preset->settings() );
}
m_presetsPopup->setPaintOpSettingsWidget(m_optionWidget);
} else {
m_presetsPopup->setPaintOpSettingsWidget(0);
}
if(preset->settings()) {
// XXX: Clean this up for 2.1, when the settings won't have a pointer to their widget anymore
preset->settings()->widget()->setConfiguration(preset->settings());
}
m_resourceProvider->slotPaintOpPresetActivated(preset);
m_activePreset = preset.data();
}
KoID KisPaintopBox::defaultPaintop(const KoInputDevice & inputDevice)
......@@ -274,29 +277,27 @@ KoID KisPaintopBox::defaultPaintop(const KoInputDevice & inputDevice)
KisPaintOpPresetSP KisPaintopBox::activePreset(const KoID & paintop, const KoInputDevice & inputDevice)
{
QList<KisPaintOpPresetSP> settingsArray;
InputDevicePresetsMap::iterator it = m_inputDevicePresets.find(inputDevice);
if (it == m_inputDevicePresets.end()) {
foreach(const KoID & paintopId, m_paintops) {
KisPaintOpPresetSP preset =
KisPaintOpRegistry::instance()->defaultPreset(paintopId, 0, inputDevice, m_view->image());
if (preset && preset->settings() && preset->settings()->widget()) {
preset->settings()->widget()->hide();
}
settingsArray.append(preset);
QHash<QString, KisPaintOpPresetSP> settingsArray;
if ( !m_inputDevicePresets.contains( inputDevice ) ) {
foreach( const KoID& paintop, KisPaintOpRegistry::instance()->listKeys() ) {
settingsArray[paintop.id()] =
KisPaintOpRegistry::instance()->defaultPreset(paintop, 0, inputDevice, m_view->image());
}
m_inputDevicePresets[ inputDevice ] = settingsArray;
} else {
settingsArray = (*it);
m_inputDevicePresets[inputDevice] = settingsArray;
}
else {
settingsArray = m_inputDevicePresets[inputDevice];
}
const int index = m_paintops.indexOf(paintop);
if (index >= 0 && index < settingsArray.count())
return settingsArray[index];
else
return 0;
if ( settingsArray.contains( paintop.id() ) ) {
KisPaintOpPresetSP preset = settingsArray[paintop.id()];
return preset;
}
else {
kWarning() << "Could not get paintop preset for paintop " << paintop.name() << ", return default";
return KisPaintOpRegistry::instance()->defaultPreset(paintop, 0, inputDevice, m_view->image());
}
}
......
......@@ -43,7 +43,7 @@ class KisView2;
class KisCanvasResourceProvider;
class KisPresetWidget;
class KisPaintOpPresetsPopup;
class KisConfigWidget;
class KisPaintOpSettingsWidget;
/**
* This widget presents all paintops that a user can paint with.
......@@ -91,7 +91,7 @@ private:
QComboBox * m_cmbPaintopPresets;
QHBoxLayout * m_layout;
KisConfigWidget * m_optionWidget;
KisPaintOpSettingsWidget * m_optionWidget;
KisPresetWidget * m_presetWidget;
KisPaintOpPresetsPopup * m_presetsPopup;
KisView2 * m_view;
......@@ -99,10 +99,12 @@ private:
QList<KoID> m_paintops;
QList<KoID> m_displayedOps;
KisPaintOpPreset* m_activePreset;
typedef QHash<KoInputDevice, KoID> InputDevicePaintopMap;
InputDevicePaintopMap m_currentID;
typedef QHash<KoInputDevice, QList<KisPaintOpPresetSP> > InputDevicePresetsMap;
typedef QHash<KoInputDevice, QHash<QString, KisPaintOpPresetSP> > InputDevicePresetsMap;
InputDevicePresetsMap m_inputDevicePresets;
};
......
......@@ -75,8 +75,6 @@ KisPaintOpPresetsPopup::~KisPaintOpPresetsPopup()
{
m_d->layout->removeWidget(m_d->settingsWidget);
m_d->settingsWidget->hide();
m_d->settingsWidget->setParent(0);
m_d->settingsWidget = 0;
delete m_d;
}
......
/*
* Copyright (c) 2007 Cyrille Berger <cberger@cberger.net>
* Copyright (c) 2008 Boudewijn Rempt <boud@valdyas.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -34,7 +35,9 @@ struct KisPopupButton::Private {
QWidget* popupWidget;
};
KisPopupButton::KisPopupButton(QWidget* parent) : QPushButton(parent), d(new Private)
KisPopupButton::KisPopupButton(QWidget* parent)
: QPushButton(parent)
, m_d(new Private)
{
setObjectName("KisPopupButton");
connect(this, SIGNAL(released()), SLOT(showPopupWidget()));
......@@ -42,68 +45,70 @@ KisPopupButton::KisPopupButton(QWidget* parent) : QPushButton(parent), d(new Pri
KisPopupButton::~KisPopupButton()
{
delete d;
m_d->frameLayout->removeWidget(m_d->popupWidget);
m_d->popupWidget->hide();
delete m_d;
}
void KisPopupButton::setAlwaysVisible(bool v)
{
if (v) {
d->frame->setFrameStyle(Qt::SubWindow);
m_d->frame->setFrameStyle(Qt::SubWindow);
showPopupWidget();
} else {
d->frame->setFrameStyle(Qt::Popup);
m_d->frame->setFrameStyle(Qt::Popup);
}
}
void KisPopupButton::setPopupWidget(QWidget* widget)
{
delete d->popupWidget;
delete d->frame;
delete m_d->popupWidget;
delete m_d->frame;
if (widget) {
d->frame = new QFrame(this);
d->frame->setFrameStyle(QFrame::Box | QFrame::Plain);
d->frame->setWindowFlags(Qt::Popup);
d->frameLayout = new QHBoxLayout(d->frame);
d->frameLayout->setMargin(0);
d->frameLayout->setSizeConstraint( QLayout::SetFixedSize );
d->frame->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
d->popupWidget = widget;
d->popupWidget->setParent(d->frame);
d->frameLayout->addWidget(d->popupWidget);
m_d->frame = new QFrame(this);
m_d->frame->setFrameStyle(QFrame::Box | QFrame::Plain);
m_d->frame->setWindowFlags(Qt::Popup);
m_d->frameLayout = new QHBoxLayout(m_d->frame);
m_d->frameLayout->setMargin(0);
m_d->frameLayout->setSizeConstraint( QLayout::SetFixedSize );
m_d->frame->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
m_d->popupWidget = widget;
m_d->popupWidget->setParent(m_d->frame);
m_d->frameLayout->addWidget(m_d->popupWidget);
}
}\
}
void KisPopupButton::setPopupWidgetWidth(int w)
{
d->frame->resize(w, d->frame->height());
m_d->frame->resize(w, m_d->frame->height());
}
void KisPopupButton::showPopupWidget()
{
if (d->popupWidget) {
QSize popSize = d->popupWidget->size();
if (m_d->popupWidget) {
QSize popSize = m_d->popupWidget->size();
QRect popupRect(this->mapToGlobal(QPoint(0, this->size().height())), popSize);
// Make sure the popup is not drawn outside the screen area
QRect screenRect = QApplication::desktop()->availableGeometry(d->frame);
QRect screenRect = QApplication::desktop()->availableGeometry(m_d->frame);
if (popupRect.right() > screenRect.right())
popupRect.translate(screenRect.right() - popupRect.right(), 0);
if (popupRect.left() < screenRect.left())
popupRect.translate(screenRect.left() - popupRect.left(), 0);
if (popupRect.bottom() > screenRect.bottom())
popupRect.translate(0, -d->frame->height());
popupRect.translate(0, -m_d->frame->height());
d->frame->setGeometry(popupRect);
d->frame->raise();
d->frame->show();
m_d->frame->setGeometry(popupRect);
m_d->frame->raise();
m_d->frame->show();
}
}
void KisPopupButton::hidePopupWidget()
{
if (d->popupWidget) {
d->frame->setVisible(false);
if (m_d->popupWidget) {
m_d->frame->setVisible(false);
}
}
......
......@@ -65,7 +65,7 @@ public slots:
private:
struct Private;
Private* const d;
Private* const m_d;
};
#endif
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