[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita
From: Gábor Lehel <illissius () gmail ! com>
Date: 2005-12-31 17:45:49
Message-ID: 1136051149.694232.9324.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 492949 by illissius:
fix connections
M +1 -1 core/kis_image.h
M +11 -8 plugins/viewplugins/histogram/histogram.cc
M +1 -1 plugins/viewplugins/histogram/histogram.h
--- trunk/koffice/krita/core/kis_image.h #492948:492949
@@ -273,7 +273,7 @@
*/
void sigLayerMoved(KisLayerSP layer, KisGroupLayerSP previousParent, KisLayerSP \
wasAboveThis);
- /// Emitted after a layer's properties (opacity, composite op, name) change
+ /// Emitted after a layer's properties (visible, locked, opacity, composite op, \
name, ...) change void sigLayerPropertiesChanged(KisLayerSP layer);
/// Emitted when the layers have changed completely
--- trunk/koffice/krita/plugins/viewplugins/histogram/histogram.cc #492948:492949
@@ -71,13 +71,15 @@
m_action = new KAction(i18n("&Histogram..."), 0, 0, this, \
SLOT(slotActivated()), actionCollection(), "histogram");
m_view = (KisView*) parent;
- if (m_view -> getCanvasSubject() -> currentImg()) {
- connect(m_view -> getCanvasSubject() -> currentImg(),
- SIGNAL(sigLayersChanged(KisImageSP)),
- this, SLOT(slotLayersChanged(KisImageSP)));
- connect(m_view -> getCanvasSubject() -> currentImg(),
- SIGNAL(sigLayersUpdated(KisImageSP)),
- this, SLOT(slotLayersChanged(KisImageSP)));
+ if (KisImageSP img = m_view -> getCanvasSubject() -> currentImg()) {
+ connect(img, SIGNAL(sigLayersChanged(KisLayerSP)), this, \
SLOT(slotLayersChanged())); + connect(img, \
SIGNAL(sigLayerAdded(KisLayerSP)), this, SLOT(slotLayersChanged())); + \
connect(img, SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayersChanged())); \
+ connect(img, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), this, \
SLOT(slotLayersChanged())); + connect(img, \
SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + \
this, SLOT(slotLayersChanged())); + connect(img, \
SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + \
this, SLOT(slotLayersChanged())); }
}
}
@@ -86,7 +88,8 @@
{
}
-void Histogram::slotLayersChanged(KisImageSP img) {
+void Histogram::slotLayersChanged() {
+ KisImageSP img = dynamic_cast<KisImage*>(const_cast<QObject*>(sender())); //bah
m_action -> setEnabled(img && img -> activeLayer() && img -> activeLayer() -> \
visible()); }
--- trunk/koffice/krita/plugins/viewplugins/histogram/histogram.h #492948:492949
@@ -35,7 +35,7 @@
private slots:
void slotActivated();
- void slotLayersChanged(KisImageSP img);
+ void slotLayersChanged();
private:
KisView * m_view;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic