...
 
Commits (6)
  • Boudewijn Rempt's avatar
    Try to fix the appimage deps build · 3cb09556
    Boudewijn Rempt authored
    This built for me, on my test vm...
    3cb09556
  • Dmitry Kazakov's avatar
    Fix artifacts when saving vector layers into PNG files · f984eab0
    Dmitry Kazakov authored
    This patch has two parts:
    
    1) KisShapeLayer should block the updates of the shape-canvas.
       When shapes are added to the layer, they initiate shape
       manager updates. That is not what we want, because all the
       rendered pixel data has already been copied in initShapeLayer()
       call.
    
    2) Add a sanity check in KisDocument::initiateSavingInBackground().
       Theoretically, there should be no pending updates after cloning
       operation. But if they still appear somehow (which is a bug),
       just force them wait until they complete their execution.
    
    BUG:404976
    CCBUG:404742
    f984eab0
  • Dmitry Kazakov's avatar
    Add sanity check for the image being idle after cloning · 74160869
    Dmitry Kazakov authored
    CCBUG:404742
    74160869
  • Gernene Tan's avatar
  • Script Kiddy's avatar
    SVN_SILENT made messages (.desktop file) - always resolve ours · ddbc6716
    Script Kiddy authored
    In case of conflict in i18n, keep the version of the branch "ours"
    To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
    ddbc6716
  • Boudewijn Rempt's avatar
    Check whether we are using the best-quality image on the clipboard · 09d3bdbe
    Boudewijn Rempt authored
    Firefox can put multiple versions of an image on the clipboard. From
    tests, there's always a fairly useless JPG, and sometimes a decent
    PNG, but of the formats it advertises, in my tests, only these two
    are present. It seems a bit timing dependent, in that if Krita is running,
    chances for getting the PNG clip are a bit better, but still not 100%.
    
    There's nothing more we can do that check whether we've got the best
    image type, in the order PNG, TIFF, BMP, JPEG, and use that.
    
    This is debug output that shows what's on the clipboard if we're lucky:
    
    Format "TIMESTAMP"
    Format "TARGETS"
    Format "MULTIPLE"
    Format "SAVE_TARGETS"
    Format "text/html"
    Format "text/_moz_htmlinfo"
    Format "text/_moz_htmlcontext"
    Format "image/png"
    data 290949 mime "image/png"
    Loaded image succesfully QImage::Format_ARGB32 true
    Format "image/bmp"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/bmp"
    Format "image/x-bmp"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/x-bmp"
    Format "image/x-MS-bmp"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/x-MS-bmp"
    Format "image/x-icon"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/x-icon"
    Format "image/x-ico"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/x-ico"
    Format "image/x-win-bitmap"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/x-win-bitmap"
    Format "image/vnd.microsoft.icon"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/vnd.microsoft.icon"
    Format "application/ico"
    Format "image/ico"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/ico"
    Format "image/icon"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/icon"
    Format "text/ico"
    Format "image/jpeg"
    data 33290 mime "image/jpeg"
    Loaded image succesfully QImage::Format_RGB32 false
    Format "image/tiff"
    data 0 mime "application/x-zerosize"
    Could not load image of type "image/tiff"
    Format "application/x-qt-image"
    Final QImage QImage::Format_ARGB32 true
    
    We cannot do more than this, so I'm closing
    
    BUG:406781
    09d3bdbe
......@@ -22,7 +22,7 @@ ExternalProject_Add( ext_fftw3
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch_mingw.patch
INSTALL_DIR ${PREFIX_ext_fftw3}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DENABLE_THREADS=ON -ENABLE_SSE=ON -ENABLE_SSE2=ON -DBUILD_TESTS=OFF
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_fftw3} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DWITH_COMBINED_THREADS=ON -ENABLE_SSE=ON -ENABLE_SSE2=ON -DBUILD_TESTS=OFF
UPDATE_COMMAND ""
)
......
......@@ -23,7 +23,7 @@ Name[ja]=映画 16:10 [ 2484x1200、96dpi RGB、8 ビット ]
Name[kk]=Кино пішімі 106:1 [ 2484x1200 , 96 н/д RGB , 8бит ]
Name[nb]=Designkino 16:10 [ 2484x1200 , 96dpi RGB , 8bit ]
Name[nl]=Design cinema 16:10 [ 2484x1200 , 96dpi RGB , 8bit ]
Name[nn]=Design filmformat 16:10 (2484 × 1200, 96 ppt., RGB, 8 bit)
Name[nn]=Design – filmformat 16:10 (2484 × 1200, 96 ppt., RGB, 8 bit)
Name[pl]=Kino projekcyjne 16:10 [ 2484x1200 , 96dpi RGB , 8bit ]
Name[pt]=Desenho de cinema 16:10 [ 2484x1200 , 96ppp RGB , 8-bits ]
Name[pt_BR]=Design de cinema 16:10 [ 2484x1200, 96dpi RGB, 8bits ]
......
......@@ -23,7 +23,7 @@ Name[ja]=映画 2.39:1 [ 2484x1040、96dpi RGB、8 ビット ]
Name[kk]=Кино пішімі 2.39:1 [ 2484x1040 , 96 н/д RGB , 8бит ]
Name[nb]=Designkino 2.39:1 [ 2484x1040 , 96dpi RGB , 8bit ]
Name[nl]=Design cinema 2.39:1 [ 2484x1040 , 96dpi RGB , 8bit ]
Name[nn]=Design filmformat 2,39:1 (2484 × 1040, 96 ppt., RGB, 8 bit)
Name[nn]=Design – filmformat 2,39:1 (2484 × 1040, 96 ppt., RGB, 8 bit)
Name[pl]=Kino projekcyjne 2.39:1 [ 2484x1040 , 96dpi RGB , 8bit ]
Name[pt]=Desenho de cinema 2,39:1 [ 2484x1040 , 96ppp RGB , 8-bits ]
Name[pt_BR]=Design de cinema 2.39:1 [ 2484x1040, 96dpi RGB, 8bits ]
......
......@@ -22,6 +22,7 @@ Name[ja]=プレゼンテーション A3 横向き [ 4960x3508、300dpi RGB、8
Name[kk]=Презентация пішімі A3 жатық [ 4960x3508 , 300 н/д RGB , 8бит ]
Name[nb]=Design presentasjon A3 liggende [ 4960x3508 , 300dpi RGB , 8bit ]
Name[nl]=Design presentatie A3 Landschap [ 4960x3508 , 300dpi RGB , 8bit ]
Name[nn]=Design – A3-presentasjon (liggjande) (4960 × 3508, 300 ppt., RGB, 8 bit)
Name[pl]=Prezentacja projekcyjna A3 poziomo [ 4960x3508 , 300dpi RGB , 8bit ]
Name[pt]=Desenho de apresentação A3 em Paisagem [ 4960x3508 , 300ppp RGB , 8-bits ]
Name[pt_BR]=Design de apresentação A3 paisagem [ 4960x3508, 300dpi RGB, 8bits ]
......
......@@ -22,6 +22,7 @@ Name[ja]=プレゼンテーション A4 縦向き [ 2480x3508、300dpi RGB、8
Name[kk]=Презентация пішімі A4 жатық [ 2460x3508 , 300 н/д RGB , 8бит ]
Name[nb]=Design presentasjon A4 stående [ x3508 , 300dpi RGB , 8bit ]
Name[nl]=Design presentatie A4 portret [ 2480x3508 , 300dpi RGB , 8bit ]
Name[nn]=Design – A4-presentasjon (liggjande) (2480 × 3508, 300 ppt., RGB, 8 bit)
Name[pl]=Prezentacja projekcyjna A4 pionowo [ 2480x3508 , 300dpi RGB , 8bit ]
Name[pt]=Desenho de apresentação A4 em Paisagem [ 2480x3508 , 300ppp RGB , 8-bits ]
Name[pt_BR]=Design de apresentação A4 retrato [ 2480x3508, 300dpi RGB, 8bits ]
......
......@@ -22,6 +22,7 @@ Name[ja]=プレゼンテーション A4 縦向き [ 2480x3508、300dpi RGB、8
Name[kk]=Презентация пішімі A4 жатық [ 2460x3508 , 300 н/д RGB , 8бит ]
Name[nb]=Design presentasjon A4 stående [ x3508 , 300dpi RGB , 8bit ]
Name[nl]=Design presentatie A4 portret [ 2480x3508 , 300dpi RGB , 8bit ]
Name[nn]=Design – A4-presentasjon (liggjande) (2480 × 3508, 300 ppt., RGB, 8 bit)
Name[pl]=Prezentacja projekcyjna A4 pionowo [ 2480x3508 , 300dpi RGB , 8bit ]
Name[pt]=Desenho de apresentação A4 em Paisagem [ 2480x3508 , 300ppp RGB , 8-bits ]
Name[pt_BR]=Design de apresentação A4 retrato [ 2480x3508, 300dpi RGB, 8bits ]
......
......@@ -22,6 +22,7 @@ Name[ja]=スクリーン 4:3 [ 2250x1680、96dpi RGB、8ビット ]
Name[kk]=Экран пішімі 4:3 [ 2250x1680 , 96 н/д RGB , 8бит ]
Name[nb]=Design skjerm 4:3 [ 2250x1680 , 96dpi RGB , 8bit ]
Name[nl]=Design screen 4:3 [ 2250x1680 , 96dpi RGB , 8bit ]
Name[nn]=Design – skjerm 4:3 (2250 × 1680, 96 ppt., RGB, 8 bit)
Name[pl]=Ekran projekcyjny 4:3 [ 2250x1680 , 96dpi RGB , 8bit ]
Name[pt]=Desenho de ecrã 4:3 [ 2250x1680 , 96ppp RGB , 8-bits ]
Name[pt_BR]=Design de tela 4:3 [ 2250x1680, 96dpi RGB, 8bits ]
......
......@@ -21,7 +21,7 @@ Name[it]=Progettazione web [ 2160x1440 , 72ppi RGB , 8bit ]
Name[ja]=ウェブデザイン [ 2160x1440、72ppi RGB、8 ビット ]
Name[nb]=Web Design [ 2160x1440 , 72ppi RGB , 8bit ]
Name[nl]=Webontwerp [ 2160x1440 , 72ppi RGB , 8bit ]
Name[nn]=Vevdesign (2160 × 1440, 72 ppt., RGB, 8 bit)
Name[nn]=Design – nettside (2160 × 1440, 72 ppt., RGB, 8 bit)
Name[pl]=Projekt sieciowy [ 2160x1440 , 72ppi RGB , 8bit ]
Name[pt]=Desenho na Web [ 2160x1440 , 72ppp RGB , 8-bits ]
Name[pt_BR]=Web Design [ 2160x1440 , 72ppi RGB , 8bits ]
......
......@@ -23,6 +23,7 @@ Name[kk]=Canon_550D_5184x3456
Name[ko]=Canon_550D_5184x3456
Name[nb]=Canon_550D_5184x3456
Name[nl]=Canon_550D_5184x3456
Name[nn]=Canon EOS 550D (5184 × 3456)
Name[pl]=Canon_550D_5184x3456
Name[pt]=Canon_550D_5184x3456
Name[pt_BR]=Canon 550D 5184x3456
......
......@@ -23,6 +23,7 @@ Name[kk]=Canon_5Dmk3_5760x3840
Name[ko]=Canon_5Dmk3_5760x3840
Name[nb]=Canon_5Dmk3_5760x3840
Name[nl]=Canon_5Dmk3_5760x3840
Name[nn]=Canon EOS 5D Mark III (5760 × 3840)
Name[pl]=Canon_5Dmk3_5760x3840
Name[pt]=Canon_5Dmk3_5760x3840
Name[pt_BR]=Canon 5D Mark III 5760x3840
......
......@@ -23,6 +23,7 @@ Name[kk]=Nikon_D3000_3872x2592
Name[ko]=Nikon_D3000_3872x2592
Name[nb]=Nikon_D3000_3872x2592
Name[nl]=Nikon_D3000_3872x2592
Name[nn]=Nikon D3000 (3872 × 2592)
Name[pl]=Nikon_D3000_3872x2592
Name[pt]=Nikon_D3000_3872x2592
Name[pt_BR]=Nikon D3000 3872x2592
......
......@@ -23,6 +23,7 @@ Name[kk]=Nikon_D5000_4288x2848
Name[ko]=Nikon_D5000_4288x2848
Name[nb]=Nikon_D5000_4288x2848
Name[nl]=Nikon_D5000_4288x2848
Name[nn]=Nikon D5000 (4288 × 2848)
Name[pl]=Nikon_D5000_4288x2848
Name[pt]=Nikon_D5000_4288x2848
Name[pt_BR]=Nikon D5000 4288x2848
......
......@@ -23,6 +23,7 @@ Name[kk]=Nikon_D7000_4928x3264
Name[ko]=Nikon_D7000_4928x3264
Name[nb]=Nikon_D7000_4928x3264
Name[nl]=Nikon_D7000_4928x3264
Name[nn]=Nikon D7000 (4928 × 3264)
Name[pl]=Nikon_D7000_4928x3264
Name[pt]=Nikon_D7000_4928x3264
Name[pt_BR]=Nikon D7000 4928x3264
......
......@@ -37,6 +37,13 @@ public:
* be asynchronous, so you should call image->waitForDone() after that.
*/
virtual void forceUpdateTimedNode() = 0;
/**
* @return true if forceUpdateTimedNode() is going to
* produce any real updates, that is the node has any
* updates still pending
*/
virtual bool hasPendingTimedUpdates() const = 0;
};
#endif // KISDELAYEDUPDATENODEINTERFACE_H
......@@ -1514,6 +1514,17 @@ namespace KisLayerUtils {
});
}
bool hasDelayedNodeWithUpdates(KisNodeSP root)
{
return recursiveFindNode(root,
[] (KisNodeSP node) {
KisDelayedUpdateNodeInterface *delayedUpdate =
dynamic_cast<KisDelayedUpdateNodeInterface*>(node.data());
return delayedUpdate ? delayedUpdate->hasPendingTimedUpdates() : false;
});
}
KisImageSP findImageByHierarchy(KisNodeSP node)
{
while (node) {
......
......@@ -51,6 +51,7 @@ namespace KisLayerUtils
*/
KRITAIMAGE_EXPORT bool checkIsCloneOf(KisNodeSP node, const KisNodeList &nodes);
KRITAIMAGE_EXPORT void forceAllDelayedNodesUpdate(KisNodeSP root);
KRITAIMAGE_EXPORT bool hasDelayedNodeWithUpdates(KisNodeSP root);
KRITAIMAGE_EXPORT KisNodeList sortAndFilterMergableInternalNodes(KisNodeList nodes, bool allowMasks = false);
......
......@@ -425,7 +425,7 @@ void KisTransformMask::setY(qint32 y)
void KisTransformMask::forceUpdateTimedNode()
{
if (m_d->updateSignalCompressor.isActive()) {
if (hasPendingTimedUpdates()) {
KIS_SAFE_ASSERT_RECOVER_NOOP(!m_d->staticCacheValid);
m_d->updateSignalCompressor.stop();
......@@ -433,6 +433,11 @@ void KisTransformMask::forceUpdateTimedNode()
}
}
bool KisTransformMask::hasPendingTimedUpdates() const
{
return m_d->updateSignalCompressor.isActive();
}
void KisTransformMask::threadSafeForceStaticImageUpdate()
{
emit sigInternalForceStaticImageUpdate();
......
......@@ -75,6 +75,7 @@ public:
void setY(qint32 y) override;
void forceUpdateTimedNode() override;
bool hasPendingTimedUpdates() const override;
void threadSafeForceStaticImageUpdate();
......
......@@ -803,6 +803,27 @@ bool KisDocument::initiateSavingInBackground(const QString actionName,
return false;
}
auto waitForImage = [] (KisImageSP image) {
KisMainWindow *window = KisPart::instance()->currentMainwindow();
if (window) {
if (window->viewManager()) {
window->viewManager()->blockUntilOperationsFinishedForced(image);
}
}
};
{
KisNodeSP newRoot = clonedDocument->image()->root();
KIS_SAFE_ASSERT_RECOVER(!KisLayerUtils::hasDelayedNodeWithUpdates(newRoot)) {
KisLayerUtils::forceAllDelayedNodesUpdate(newRoot);
waitForImage(clonedDocument->image());
}
}
KIS_SAFE_ASSERT_RECOVER(clonedDocument->image()->isIdle()) {
waitForImage(clonedDocument->image());
}
KIS_ASSERT_RECOVER_RETURN_VALUE(!d->backgroundSaveDocument, false);
KIS_ASSERT_RECOVER_RETURN_VALUE(!d->backgroundSaveJob.isValid(), false);
d->backgroundSaveDocument.reset(clonedDocument.take());
......
......@@ -115,6 +115,11 @@ public:
m_layer->signalUpdate(m_layer->boundingImageRect());
}
bool hasPendingUpdates() const override
{
return false;
}
void rerenderAfterBeingInvisible() override {}
void resetCache() override {}
void setImage(KisImageWSP /*image*/) override {}
......
......@@ -175,12 +175,16 @@ KisShapeLayer::KisShapeLayer(const KisShapeLayer& _rhs, KoShapeControllerBase* c
*/
const QTransform thisInvertedTransform = this->absoluteTransformation(0).inverted();
m_d->canvas->setUpdatesBlocked(true);
Q_FOREACH (KoShape *shape, _rhs.shapes()) {
KoShape *clonedShape = shape->cloneShape();
KIS_SAFE_ASSERT_RECOVER(clonedShape) { continue; }
clonedShape->setTransformation(shape->absoluteTransformation(0) * thisInvertedTransform);
addShape(clonedShape);
}
m_d->canvas->setUpdatesBlocked(true);
}
KisShapeLayer::KisShapeLayer(const KisShapeLayer& _rhs, const KisShapeLayer &_addShapes)
......@@ -475,6 +479,11 @@ void KisShapeLayer::forceUpdateTimedNode()
m_d->canvas->forceRepaint();
}
bool KisShapeLayer::hasPendingTimedUpdates() const
{
return m_d->canvas->hasPendingUpdates();
}
bool KisShapeLayer::saveShapesToStore(KoStore *store, QList<KoShape *> shapes, const QSizeF &sizeInPt)
{
if (!store->open("content.svg")) {
......
......@@ -146,6 +146,11 @@ public:
*/
void forceUpdateTimedNode() override;
/**
* \return true if there are any pending updates in the delayed queue
*/
bool hasPendingTimedUpdates() const override;
protected:
using KoShape::isVisible;
......
......@@ -111,6 +111,16 @@ KoUnit KisShapeLayerCanvasBase::unit() const
return KoUnit(KoUnit::Point);
}
void KisShapeLayerCanvasBase::setUpdatesBlocked(bool value)
{
m_updatesBlocked = value;
}
bool KisShapeLayerCanvasBase::updatesBlocked() const
{
return m_updatesBlocked;
}
void KisShapeLayerCanvasBase::prepareForDestroying()
{
m_isDestroying = true;
......@@ -138,7 +148,7 @@ KisShapeLayerCanvas::KisShapeLayerCanvas(KisShapeLayer *parent, KisImageWSP imag
connect(&m_asyncUpdateSignalCompressor, SIGNAL(timeout()), SLOT(slotStartAsyncRepaint()));
connect(this, SIGNAL(forwardRepaint()), &m_canvasUpdateCompressor, SLOT(start()));
connect(&m_canvasUpdateCompressor, SIGNAL(timeout()), this, SLOT(repaint()));
connect(&m_canvasUpdateCompressor, SIGNAL(timeout()), this, SLOT(slotStartDirectSyncRepaint()));
setImage(image);
}
......@@ -207,7 +217,7 @@ private:
void KisShapeLayerCanvas::updateCanvas(const QVector<QRectF> &region)
{
if (!m_parentLayer->image() || m_isDestroying) {
if (!m_parentLayer->image() || m_isDestroying || m_updatesBlocked) {
return;
}
......@@ -240,6 +250,7 @@ void KisShapeLayerCanvas::updateCanvas(const QVector<QRectF> &region)
if (qApp->thread() == QThread::currentThread()) {
emit forwardRepaint();
m_hasDirectSyncRepaintInitiated = true;
} else {
m_asyncUpdateSignalCompressor.start();
m_hasUpdateInCompressor = true;
......@@ -258,6 +269,12 @@ void KisShapeLayerCanvas::slotStartAsyncRepaint()
m_image->addSpontaneousJob(new KisRepaintShapeLayerLayerJob(m_parentLayer, this));
}
void KisShapeLayerCanvas::slotStartDirectSyncRepaint()
{
m_hasDirectSyncRepaintInitiated = false;
repaint();
}
void KisShapeLayerCanvas::slotImageSizeChanged()
{
QRegion dirtyCacheRegion;
......@@ -330,12 +347,17 @@ void KisShapeLayerCanvas::forceRepaint()
* The only real solution to this is to port vector tools to strokes framework.
*/
if (m_hasUpdateInCompressor) {
if (hasPendingUpdates()) {
m_asyncUpdateSignalCompressor.stop();
slotStartAsyncRepaint();
}
}
bool KisShapeLayerCanvas::hasPendingUpdates() const
{
return m_hasUpdateInCompressor || m_hasDirectSyncRepaintInitiated;
}
void KisShapeLayerCanvas::resetCache()
{
m_projection->clear();
......
......@@ -47,6 +47,7 @@ public:
virtual void setImage(KisImageWSP image) = 0;
void prepareForDestroying();
virtual void forceRepaint() = 0;
virtual bool hasPendingUpdates() const = 0;
bool hasChangedWhileBeingInvisible();
virtual void rerenderAfterBeingInvisible() = 0;
......@@ -66,12 +67,16 @@ public:
void updateInputMethodInfo() override {}
void setCursor(const QCursor &) override {}
void setUpdatesBlocked(bool value);
bool updatesBlocked() const;
protected:
QScopedPointer<KisImageViewConverter> m_viewConverter;
QScopedPointer<KoShapeManager> m_shapeManager;
QScopedPointer<KoSelectedShapesProxy> m_selectedShapesProxy;
bool m_hasChangedWhileBeingInvisible {false};
bool m_isDestroying {false};
bool m_updatesBlocked {false};
};
/**
......@@ -98,6 +103,7 @@ public:
void updateCanvas(const QRectF& rc) override;
void updateCanvas(const QVector<QRectF> &region);
void forceRepaint() override;
bool hasPendingUpdates() const override;
void resetCache() override;
void rerenderAfterBeingInvisible() override;
......@@ -106,6 +112,7 @@ private Q_SLOTS:
friend class KisRepaintShapeLayerLayerJob;
void repaint();
void slotStartAsyncRepaint();
void slotStartDirectSyncRepaint();
void slotImageSizeChanged();
Q_SIGNALS:
......@@ -121,6 +128,7 @@ private:
KisThreadSafeSignalCompressor m_asyncUpdateSignalCompressor;
volatile bool m_hasUpdateInCompressor = false;
volatile bool m_hasDirectSyncRepaintInitiated = false;
QRegion m_dirtyRegion;
QMutex m_dirtyRegionMutex;
......
......@@ -36,6 +36,8 @@
#include <KoColorSpaceRegistry.h>
#include <KoColorProfile.h>
#include <KisMimeDatabase.h>
// kritaimage
#include <kis_types.h>
#include <kis_paint_device.h>
......@@ -273,10 +275,76 @@ KisPaintDeviceSP KisClipboard::clip(const QRect &imageBounds, bool showPopup, Ki
}
if (!clip) {
QStringList formats = cb->mimeData()->formats();
QMap<int, QImage> qimages;
Q_FOREACH(const QString format, formats) {
// qDebug() << "Format" << format;
QImage image;
if (format.startsWith("image")) {
int priority = -1;
QByteArray ba = cb->mimeData()->data(format);
// qDebug() << "data" << ba.size() << "mime" << KisMimeDatabase::mimeTypeForData(ba);
if (ba.isEmpty()) {
continue;
}
QString qimageioFormat;
if (format == "image/png") {
qimageioFormat = "PNG";
priority = 0;
}
else if (format == "image/tiff") {
qimageioFormat = "TIFF";
priority = 1;
}
else if (format == "image/bmp"
|| format == "image/x-bmp"
|| format == "image/x-MS-bmp"
|| format == "image/x-win-bitmap") {
qimageioFormat = "BMP";
priority = 2;
}
else if (format == "image/jpeg") {
qimageioFormat = "JPG";
priority = 3;
}
if (!qimageioFormat.isEmpty()) {
image.loadFromData(ba, qimageioFormat.toLatin1());
}
if (!image.isNull()) {
// qDebug() << "Loaded image succesfully" << image.format() << image.hasAlphaChannel();
qimages[priority] = image;
}
// else {
// qDebug() << "Could not load image of type" << format;
// }
}
}
QImage qimage = cb->image();
if (qimage.isNull())
for(int i = 0; i < 4; i++) {
if (qimages.contains(i)) {
qimage = qimages[i];
break;
}
}
// qDebug() << "Final QImage" << qimage.format() << qimage.hasAlphaChannel();
if (qimage.isNull()) {
return KisPaintDeviceSP(0);
}
KisConfig cfg(true);
quint32 behaviour = cfg.pasteBehaviour();
......@@ -290,8 +358,6 @@ KisPaintDeviceSP KisClipboard::clip(const QRect &imageBounds, bool showPopup, Ki
dontPrompt.blockSignals(true);
mb.setWindowTitle(i18nc("@title:window", "Missing Color Profile"));
mb.setText(i18n("The image data you are trying to paste has no color profile information. How do you want to interpret these data? \n\n As Web (sRGB) - Use standard colors that are displayed from computer monitors. This is the most common way that images are stored. \n\nAs on Monitor - If you know a bit about color management and want to use your monitor to determine the color profile.\n\n"));
......@@ -301,8 +367,6 @@ KisPaintDeviceSP KisClipboard::clip(const QRect &imageBounds, bool showPopup, Ki
mb.addButton(i18n("Cancel"), QMessageBox::RejectRole);
mb.addButton(&dontPrompt, QMessageBox::ActionRole);
behaviour = mb.exec();
if (behaviour > 1) {
......@@ -350,15 +414,15 @@ void KisClipboard::clipboardDataChanged()
m_hasClip = false;
QClipboard *cb = QApplication::clipboard();
if (cb->mimeData()->hasImage()) {
QImage qimage = cb->image();
if (!qimage.isNull())
m_hasClip = true;
const QMimeData *cbData = cb->mimeData();
QByteArray mimeType("application/x-krita-selection");
if (cbData && cbData->hasFormat(mimeType))
m_hasClip = true;
if (!qimage.isNull())
m_hasClip = true;
}
}
if (m_hasClip) {
......
......@@ -259,6 +259,7 @@ KoFillConfigWidget::KoFillConfigWidget(KoCanvasBase *canvas, KoFlake::FillVarian
d->ui->btnPatternFill->setIcon(QPixmap((const char **) buttonpattern));
d->group->addButton(d->ui->btnPatternFill, Pattern);
d->ui->btnPatternFill->setVisible(false);
d->colorAction = new KoColorPopupAction(d->ui->btnChooseSolidColor);
d->colorAction->setToolTip(i18n("Change the filling color"));
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>314</width>
<height>251</height>
<width>599</width>
<height>324</height>
</rect>
</property>
<property name="sizePolicy">
......
......@@ -45,6 +45,7 @@ Comment[fr]=Module externe pour l'espace de couleurs des documents sélectionné
Comment[gl]=Complemento para cambiar o espazo de cores dos documentos seleccionados.
Comment[it]=Estensione per cambiare lo spazio dei colori ai documenti selezionati
Comment[nl]=Plug-in om kleurruimte in geselecteerde documenten te wijzigen
Comment[nn]=Programtillegg for å byta fargerom på utvalde dokument
Comment[pl]=Wtyczka do zmiany przestrzeni barw wybranych dokumentów
Comment[pt]='Plugin' para mudar o espaço de cores do documento seleccionado
Comment[pt_BR]=Plugin para alterar o espaço de cores em documentos selecionados
......
......@@ -19,6 +19,7 @@ Name[gl]=Ferramentas de xestión de proxectos de cómics
Name[is]=Verkefnisstjórn teiknimyndasögu
Name[it]=Strumenti per la gestione dei progetti di fumetti
Name[nl]=Hulpmiddelen voor projectbeheer van strips
Name[nn]=Prosjekthandsamingsverktøy for teikneseriar
Name[pl]=Narzędzia do zarządzania projektami komiksów
Name[pt]=Ferramentas de Gestão de Projectos de Banda Desenhada
Name[sv]=Projekthanteringsverktyg för tecknade serier
......@@ -42,6 +43,7 @@ Comment[gl]=Ferramentas para xestionar cómics.
Comment[is]=Verkfæri til að stýra gerð teiknimyndasögu.
Comment[it]=Strumenti per la gestione dei fumetti.
Comment[nl]=Hulpmiddelen voor beheer van strips.
Comment[nn]=Verktøy for handsaming av teikneseriar.
Comment[pl]=Narzędzie do zarządzania komiksami.
Comment[pt]=Ferramentas para gerir bandas desenhadas.
Comment[sv]=Verktyg för att hantera tecknade serier.
......
......@@ -42,6 +42,7 @@ Comment[fr]=Module externe de gestion des propriétés des documents sélectionn
Comment[gl]=Complemento para manipular as propiedades dos documentos seleccionados.
Comment[it]=Estensione per manipolare le proprietà dei documenti selezionati
Comment[nl]=Plug-in om eigenschappen van geselecteerde documenten te manipuleren
Comment[nn]=Programtillegg for endra eigenskapar på utvalde dokument
Comment[pl]=Wtyczka do zmiany właściwości wybranych dokumentów
Comment[pt]='Plugin' para manipular as propriedades dos documentos seleccionados
Comment[pt_BR]=Plugin para manipular as propriedades de documentos selecionados
......
......@@ -45,6 +45,7 @@ Comment[fr]=Module externe d'export de calques d'un document
Comment[gl]=Complemento para exportar as capas dun documento.
Comment[it]=Estensione per esportare i livelli da un documento
Comment[nl]=Plug-in om lagen uit een document te exporteren
Comment[nn]=Programtillegg for eksportering av biletlag i dokument
Comment[pl]=Wtyczka do eksportowania warstw z dokumentu
Comment[pt]='Plugin' para exportar as camadas de um documento
Comment[pt_BR]=Plugin para exportar as camadas de um documento
......
......@@ -44,6 +44,7 @@ Comment[fr]=Module externe de gestion des filtres
Comment[gl]=Complemento para a xestión de filtros.
Comment[it]=Estensione per la gestione dei filtri
Comment[nl]=Plug-in voor beheer van filters
Comment[nn]=Programtillegg for filterhandsaming
Comment[pl]=Wtyczka do zarządzania filtrami
Comment[pt]='Plugin' para a gestão de filtros
Comment[pt_BR]=Plugin para gerenciamento de filtros
......
......@@ -46,6 +46,7 @@ Comment[fr]=Module externe élémentaire pour tester PyKrita
Comment[gl]=Complemento básico para probar PyKrita.
Comment[it]=Estensione di base per provare PyKrita
Comment[nl]=Basisplug-in om PyKrita te testen
Comment[nn]=Enkelt programtillegg for testing av PyKrita
Comment[pl]=Podstawowa wtyczka do wypróbowania PyKrity
Comment[pt]='Plugin' básico para testar o PyKrita
Comment[pt_BR]=Plugin básico para testar o PyKrita
......
......@@ -39,6 +39,7 @@ Comment[fr]=Filtre passe-haut, fondé sur http://registry.gimp.org/node/7385
Comment[gl]=Filtro de paso alto, baseado en http://registry.gimp.org/node/7385.
Comment[it]=Filtro di accentuazione passaggio, basato su http://registry.gimp.org/node/7385
Comment[nl]=Hoogdoorlaatfilter, gebaseerd op http://registry.gimp.org/node/7385
Comment[nn]=Høgpass-filter, basert på http://registry.gimp.org/node/7385
Comment[pl]=Filtr górnoprzepustowy, oparty na http://registry.gimp.org/node/7385
Comment[pt]=Filtro passa-alto, baseado em http://registry.gimp.org/node/7385
Comment[pt_BR]=Filtro passa alta, baseado em http://registry.gimp.org/node/7385
......
......@@ -14,7 +14,7 @@ Name[eu]=Krita-ren script abiarazlea
Name[gl]=Iniciador de scripts de Krita
Name[it]=Iniziatore di script per Krita
Name[nl]=Script-starter van Krita
Name[nn]=Krita skriptstartar
Name[nn]=Krita skriptbyggjar
Name[pl]=Starter skryptów Krity
Name[pt]=Inicialização do Programa do Krita
Name[sv]=Krita skriptstart
......@@ -31,6 +31,7 @@ Comment[eu]=Sortu Krita-script berri baterako meta-datuak eta fitxategi egitura
Comment[gl]=Crear os metadatos e a estrutura de ficheiros para un novo script de Krita.
Comment[it]=Crea i metadati e la struttura dei file per un nuovo script di Krita
Comment[nl]=Maak de metagegevens en bestandsstructuur voor een nieuw Krita-script
Comment[nn]=Lag metadata og filstruktur for nytt Krita-skript
Comment[pl]=Utwórz metadane i strukturę plików dla nowego skryptu Krity
Comment[pt]=Cria os meta-dados e a estrutura de ficheiros para um novo programa do Krita
Comment[sv]=Skapa metadata och filstruktur för ett nytt Krita-skript
......
......@@ -17,6 +17,7 @@ Name[fr]=Récemment ouverts
Name[gl]=Doca dos últimos documentos
Name[it]=Area di aggancio Ultimi documenti
Name[nl]=Laatste documenten verankering
Name[nn]=Dokk for nyleg brukte dokument
Name[pl]=Dok ostatnich dokumentów
Name[pt]=Área dos Últimos Documentos
Name[sv]=Dockningsfönster för senaste dokument
......@@ -38,6 +39,7 @@ Comment[fr]=Panneau en Python pour afficher les vignettes des dix derniers docum
Comment[gl]=Unha doca baseada en Python para mostrar as miniaturas dos últimos dez documentos.
Comment[it]=Un'area di aggancio basata su Python per mostrare miniature degli ultimi dieci documenti.
Comment[nl]=Een op Python gebaseerde vastzetter om miniaturen te tonen naar de laatste tien documenten.
Comment[nn]=Python-basert dokk for vising av miniatyrbilete av dei siste ti dokumenta
Comment[pl]=Dok oparty na pythonie do wyświetlania miniatur ostatnich dziesięciu dokumentów
Comment[pt]=Uma área acoplável, feita em Python, para mostrar as miniaturas dos últimos dez documentos
Comment[sv]=Ett Python-baserat dockningsfönster för att visa miniatyrbilder för de tio senaste dokumenten
......
......@@ -42,6 +42,7 @@ Comment[fr]=Panneau en Python pour éditer les palettes de couleurs.
Comment[gl]=Unha doca baseada en Python para editar paletas de cores.
Comment[it]=Un'area di aggancio per modificare le tavolozze di colori basata su Python.
Comment[nl]=Een op Python gebaseerde vastzetter om kleurpaletten te bewerken.
Comment[nn]=Python-basert dokk for redigering av fargepalettar.
Comment[pl]=Dok oparty na pythonie do edytowania palet barw.
Comment[pt]=Uma área acoplável, feita em Python, para editar paletas de cores.
Comment[sv]=Ett Python-baserat dockningsfönster för att redigera färgpaletter.
......
......@@ -13,6 +13,7 @@ Name[es]=Importador de complementos de Python
Name[gl]=Importador de complementos de Python
Name[it]=Importatore estensioni Python
Name[nl]=Importeur van Plugin voor Python
Name[nn]=Importering av Python-tillegg
Name[pl]=Import wtyczek Pythona
Name[pt]=Importador de 'Plugins' do Python
Name[sv]=Python-insticksimport
......@@ -29,6 +30,7 @@ Comment[es]=Importa complementos de Python desde archivos zip.
Comment[gl]=Importa complementos de Python de ficheiros zip.
Comment[it]=Importa le estensioni Python dai file compressi.
Comment[nl]=Importeert Python-plug-ins uit zip-bestanden.
Comment[nn]=Importerer Python-baserte programtillegg frå .zip-filer.
Comment[pl]=Importuj wtyczki Pythona z plików zip.
Comment[pt]=Importa os 'plugins' em Python a partir de ficheiros Zip.
Comment[sv]=Importerar Python-insticksprogram från zip-filer.
......
......@@ -18,6 +18,7 @@ Name[fr]=Réglages rapides
Name[gl]=Doca de configuración rápida
Name[it]=Area di aggancio delle impostazioni rapide
Name[nl]=Verankering voor snelle instellingen
Name[nn]=Snøgginnstillingar-dokk
Name[pl]=Dok szybkich ustawień
Name[pt]=Área de Configuração Rápida
Name[sv]=Dockningspanel med snabbinställningar
......@@ -39,6 +40,7 @@ Comment[fr]=Panneau en python pour modifier rapidement la taille et l'opacité d
Comment[gl]=Unha doca baseada en Python para cambiar rapidamente a opacidade e o tamaño dos pinceis.
Comment[it]=Un'area di aggancio basata su Python per cambiare rapidamente la dimensione del pennello e l'opacità.
Comment[nl]=Een op Python gebaseerde docker voor snel wijzigen van penseelgrootte en dekking.
Comment[nn]=Python-basert dokk for kjapt endring av penselstorleik/-tettleik.
Comment[pl]=Dok oparty na Pythonie do szybkiej zmiany rozmiaru i nieprzezroczystości pędzla.
Comment[pt]=Uma área acoplável em Python para mudar rapidamente o tamanho e opacidade do pincel.
Comment[sv]=En Python-baserad dockningspanel för att snabbt ändra penselstorlek och ogenomskinlighet.
......
......@@ -37,6 +37,7 @@ Comment[eu]=Python-oinarridun panel bat.
Comment[gl]=Unha doca escrita en Python para crear accións e apuntar a scripts escritos en Python.
Comment[it]=Un'area di aggancio basata su Python per creare azioni e scegliere script Python
Comment[nl]=Een op Python gebaseerde vastzetter voor aanmaakacties en wijzen naar Python-scripts
Comment[nn]=Python-basert dokk for å laga handlingar og peika til Python-skript
Comment[pl]=Dok oparty na pythonie do tworzenia działań i punktów dla skryptów pythona
Comment[pt]=Uma área acoplável, feita em Python, para criar acções e apontar para programas em Python
Comment[sv]=Ett Python-baserat dockningsfönster för att skapa åtgärder och peka ut Python-skript
......
......@@ -36,6 +36,7 @@ Comment[fi]=Liitännäinen satunnaisen Python-koodin suorittamiseksi
Comment[gl]=Complemento para executar código de Python escrito no momento.
Comment[it]=Estensione per eseguire ad-hoc codice Python
Comment[nl]=Plug-in om ad-hoc Python code uit te voeren
Comment[nn]=Programtillegg for køyring av ad hoc-køyring av Python-kode
Comment[pl]=Wtyczka do wykonywania kodu Pythona ad-hoc
Comment[pt]='Plugin' para executar código em Python arbitrário
Comment[sv]=Insticksprogram för att köra godtycklig Python-kod
......
......@@ -14,6 +14,7 @@ Name[fr]=Outils de sélection
Name[gl]=Doca de bolsa das seleccións
Name[it]=Area di raccolta selezioni
Name[nl]=Docker van zak met selecties
Name[nn]=Utvalssamlingsdokk
Name[pl]=Dok worka zaznaczeń
Name[pt]=Área de Selecções
Name[sv]=Dockningspanel med markeringspåse
......@@ -36,6 +37,7 @@ Comment[fr]=Panneau permettant de conserver une liste de sélections
Comment[gl]=Unha doca que permite almacenar unha lista de seleccións.
Comment[it]=Un'area di aggancio che consente di memorizzare un elenco di selezioni
Comment[nl]=Een docker die een lijst met selecties kan opslaan
Comment[nn]=Dokk for lagring av ei liste med utval
Comment[pl]=Dok, który umożliwia przechowywanie listy zaznaczeń
Comment[pt]=Uma área acoplável que permite guardar uma lista de selecções
Comment[sv]=En dockningspanel som gör det möjligt att lagra en lista över markeringar
......
......@@ -39,6 +39,7 @@ Comment[fi]=Kytke esiasetukset Ctrl-1:stä Ctrl-0:aan
Comment[gl]=Asigne unha predefinición do Ctrl+1 ao Ctrl+0.
Comment[it]=Assegna una preimpostazione per ctrl-1 a ctrl-0
Comment[nl]=Een voorinstelling toekennen aan Ctrl-1 tot Ctrl-0
Comment[nn]=Byt til ferdigpenslar med «Ctrl + 1» til «Ctrl + 0»
Comment[pl]=Przypisz nastawę do ctrl-1 lub ctrl-0
Comment[pt]=Atribuir uma predefinição de Ctrl-1 a Ctrl-0
Comment[sv]=Tilldela en förinställning för Ctrl+1 till Ctrl+0
......
......@@ -37,6 +37,7 @@ Comment[fr]=Module externe basé sur Python pour créer dix actions et les assig
Comment[gl]=Un complemento escrito en Python para crear dez accións e asignalas a scripts escritos en Python.
Comment[it]=Un'estensione basata su Python per creare dieci azioni e assegnarle a script Python
Comment[nl]=Een op Python gebaseerde plug-in voor aanmaken van tien acties en ze dan toewijzen aan Python-scripts
Comment[nn]=Python-basert programtillegg for å leggja til ti handlingar og tildela dei til Python-skript
Comment[pl]=Wtyczka oparta na Pythonie do tworzenia działań i przypisywanie ich skryptom Pythona
Comment[pt]=Um 'plugin' feito em Python para criar dez acções e atribuí-las a programas em Python
Comment[sv]=Ett Python-baserat insticksprogram för att skapa tio åtgärder och tilldela dem till Python-skript
......