[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/koffice/1.6/koffice/krita
From: Bart Coppens <kde () bartcoppens ! be>
Date: 2006-12-30 11:34:51
Message-ID: 1167478491.555336.9239.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 617779 by coppens:
When deselecting the adjustment layer, don't do weird stuff, but something \
reasonable. (But should it make everything adjusted, or nothing at all? Currently it \
does the 'everything adjusted' thing...) CCBUG:137708
M +11 -0 core/kis_adjustment_layer.cc
M +3 -0 core/kis_adjustment_layer.h
M +3 -2 ui/kis_selection_manager.cc
--- branches/koffice/1.6/koffice/krita/core/kis_adjustment_layer.cc #617778:617779
@@ -118,7 +118,18 @@
m_selection->setSelection(m_selection);
}
+void KisAdjustmentLayer::clearSelection()
+{
+ KisFillPainter gc(m_selection.data());
+ KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8();
+ QRect bounds = extent();
+ bounds |= image()->bounds();
+ gc.fillRect(bounds, KisColor(Qt::white, cs), MAX_SELECTED);
+ gc.end();
+}
+
+
Q_INT32 KisAdjustmentLayer::x() const
{
if (m_selection)
--- branches/koffice/1.6/koffice/krita/core/kis_adjustment_layer.h #617778:617779
@@ -61,6 +61,9 @@
/// Set the selction of this adjustment layer to a copy of selection.
void setSelection(KisSelectionSP selection);
+ /// Clears the selection (doesn't call any of the update or dirty methods)
+ void clearSelection();
+
virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, \
Q_INT32 h);
virtual void paintSelection(QImage &img, const QRect& scaledImageRect, const \
QSize& scaledImageSize, const QSize& imageSize); public:
--- branches/koffice/1.6/koffice/krita/ui/kis_selection_manager.cc #617778:617779
@@ -529,8 +529,9 @@
Q_CHECK_PTR(t);
// Make adjustment layers behave almost the same (except no reselect)
- if (dynamic_cast<KisAdjustmentLayer*>(img->activeLayer().data())) {
- dev->clear();
+ KisAdjustmentLayer* adj = \
dynamic_cast<KisAdjustmentLayer*>(img->activeLayer().data()); + if (adj) {
+ adj->clearSelection();
} else {
dev->deselect();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic