Need a solution for this

Cyrille Berger cberger at cberger.net
Sat Dec 31 11:59:24 CET 2005


>  dst = (KisPaintLayer*)img->activeLayer().data();
weee another java developer :)
In that case, the activeLayer is forced to be a KisPaintLayer by the flatten 
operation, but the best C++ solution is : dst = 
dynamic_cast<KisPaintLayer*>(img->activeLayer().data()); and if dst == 0 then 
throw an error message.

-- 
--- Cyrille Berger ---


More information about the kimageshop mailing list