koffice/krita

Casper Boemann cbr at boemann.dk
Thu Apr 28 09:22:07 CEST 2005


Hi

Thanks. This ties in with what I'm looking at. (I even got a merge
conflict - that's how close it ties)

I was wondering what kind of observations you made to come to this solution.

Did the signal not work at all?
Wont it be a limit to change a signal (which is many-to-many) into a
function (which is many-to-one)? Or am I missunderstanding your change?

I was myself considering to have a function in paintdevice that emits the
signal. That function could then be called as needed (by subclasses like
KisSelection and tools and selection_manager). Not that this directly messes
with you fix.

best regards / venlig hilsen
Casper Boemann

----- Original Message ----- 
From: "Sven Langkamp" <longamp at reallygood.de>
To: <kde-cvs at kde.org>
Sent: Wednesday, April 27, 2005 11:57 PM
Subject: koffice/krita


> CVS commit by langkamp:
>
> fixed selection management updates
>
>
>   M +0 -5      TODO-1.4   1.29
>   M +1 -3      core/kis_image.cc   1.200
>   M +1 -1      core/kis_image.h   1.117
>   M +6 -3      core/kis_paint_device.cc   1.158
>   M +0 -2      core/kis_paint_device.h   1.136
>
>
> --- koffice/krita/TODO-1.4  #1.28:1.29
> @@ -42,9 +42,4 @@
>  Selections
>
> -* selection management is broken: sometimes the gui doesn't realize
> -  we've got a selection, and sometimes it forgets it has disappeared.
> -  This ties in with Casper's work on making selection undo/redo
> -  history work.
> -
>  * Select freehand (drawing a shape and selecting the contents) does not
work
>
>
> --- koffice/krita/core/kis_image.cc  #1.199:1.200
> @@ -707,7 +707,4 @@ KisLayerSP KisImage::activate(KisLayerSP
>
>                  m_layerStack.insert(m_layerStack.begin() + 0, layer);
> -
> -                connect(layer.data(), SIGNAL(selectionChanged()), this,
SLOT(slotSelectionChanged()));
> -                connect(layer.data(), SIGNAL(selectionCreated()), this,
SLOT(slotSelectionCreated()));
>          }
>
> @@ -1177,4 +1174,5 @@ void KisImage::slotSelectionCreated()
>  {
>          kdDebug() << "KisImage::slotSelectionCreated\n";
> +        notify();
>          emit selectionCreated(KisImageSP(this));
>  }
>
> --- koffice/krita/core/kis_image.h  #1.116:1.117
> @@ -170,5 +170,5 @@ signals:
>          void profileChanged(KisProfileSP profile);
>
> -private slots:
> +public slots:
>          void slotSelectionChanged();
>          void slotSelectionCreated();
>
> --- koffice/krita/core/kis_paint_device.cc  #1.157:1.158
> @@ -676,5 +676,6 @@ KisSelectionSP KisPaintDevice::selection
>                  m_selection -> setVisible(true);
>                  m_hasSelection = true;
> -                emit selectionCreated();
> +                if(m_owner)
> +                        m_owner -> slotSelectionCreated();
>          }
>          return m_selection;
> @@ -686,5 +687,6 @@ void KisPaintDevice::setSelection(KisSel
>          m_selection = selection;
>          m_hasSelection = true;
> -        emit selectionChanged();
> +        if(m_owner)
> +                m_owner -> slotSelectionChanged();
>
>  }
> @@ -701,5 +703,6 @@ void KisPaintDevice::removeSelection()
>          m_selection = 0; // XXX: Does this automatically remove the
selection due to the shared pointer?
>          m_hasSelection = false;
> -        emit selectionChanged();
> +        if(m_owner)
> +                m_owner -> slotSelectionChanged();
>  }
>
>
> --- koffice/krita/core/kis_paint_device.h  #1.135:1.136
> @@ -324,6 +324,4 @@ signals:
>          void positionChanged(KisPaintDeviceSP device);
>          void ioProgress(Q_INT8 percentage);
> -        void selectionChanged();
> -        void selectionCreated();
>          void profileChanged(KisProfileSP profile);
>
>
>
>




More information about the kimageshop mailing list