[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita/plugins/viewplugins/filtersgallery
From: Cyrille Berger <cyb () lepi ! org>
Date: 2005-12-23 19:26:56
Message-ID: 1135366016.538417.31567.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 490940 by berger:
use dynamic_cast rather than Java (and not C) style casting to make Bart happy ;p
M +4 -2 kis_filters_listview.cc
--- trunk/koffice/krita/plugins/viewplugins/filtersgallery/kis_filters_listview.cc \
#490939:490940 @@ -43,8 +43,10 @@
{
// Check which filters support painting
KisImageSP img = m_view->getCanvasSubject()->currentImg();
- KisLayerSP activeLayer = img->activeLayer();
- m_thumb = new KisPaintLayer( * ((KisPaintLayer*)activeLayer.data()));
+ KisPaintLayerSP activeLayer = dynamic_cast<KisPaintLayer*>( \
img->activeLayer().data()); + if(activeLayer == 0)
+ return; // TODO: warn the user and fix the filters engine
+ m_thumb = new KisPaintLayer( *activeLayer );
m_imgthumb = new KisImage(0, m_thumb->exactBounds().width(), \
m_thumb->exactBounds().height(), m_thumb->paintDevice()->colorSpace(), "thumbnail"); \
m_imgthumb->addLayer(m_thumb.data(), m_imgthumb->rootLayer(), 0); double sx = \
100./m_thumb->exactBounds().width();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic