Commit db436ad7 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Merge branch 'master' into krita-testing-wolthera

parents 00b8d54f a819895c
......@@ -83,12 +83,12 @@ endif()
# define common versions of Krita applications, used to generate kritaversion.h
# update these version for every release:
set(KRITA_VERSION_STRING "3.0.1 Alpha")
set(KRITA_VERSION_STRING "3.0.1 Betas")
set(KRITA_STABLE_VERSION_MAJOR 3) # 3 for 3.x, 4 for 4.x, etc.
set(KRITA_STABLE_VERSION_MINOR 0) # 0 for 3.0, 1 for 3.1, etc.
set(KRITA_VERSION_RELEASE 89) # 89 for Alpha, increase for next test releases, set 0 for first Stable, etc.
set(KRITA_ALPHA 1) # uncomment only for Alpha
#set(KRITA_BETA 1) # uncomment only for Beta
set(KRITA_VERSION_RELEASE 90) # 89 for Alpha, increase for next test releases, set 0 for first Stable, etc.
#set(KRITA_ALPHA 1) # uncomment only for Alpha
set(KRITA_BETA 1) # uncomment only for Beta
#set(KRITA_RC 1) # uncomment only for RC
set(KRITA_YEAR 2016) # update every year
......@@ -309,7 +309,6 @@ else()
endif()
add_definitions(
-DTRANSLATION_DOMAIN=\"krita\"
-DQT_USE_QSTRINGBUILDER
-DQT_STRICT_ITERATORS
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
......@@ -657,6 +656,12 @@ add_subdirectory(plugins)
add_subdirectory( benchmarks )
add_definitions(-DTRANSLATION_DOMAIN=\"krita\")
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
macro_display_feature_log()
calligra_product_deps_report("product_deps")
......@@ -668,3 +673,5 @@ configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h )
check_function_exists(powf HAVE_POWF)
configure_file(config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h)
......@@ -2,7 +2,7 @@
<kpartgui xmlns="http://www.kde.org/standards/kxmlgui/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Krita"
version="93"
version="94"
xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd">
<MenuBar>
<Menu name="file" noMerge="1">
......
......@@ -34,6 +34,7 @@ struct Q_DECL_HIDDEN KisStrokesQueue::Private {
: openedStrokesCounter(0),
needsExclusiveAccess(false),
wrapAroundModeSupported(false),
currentStrokeLoaded(false),
lodNNeedsSynchronization(true),
desiredLevelOfDetail(0),
nextDesiredLevelOfDetail(0) {}
......@@ -42,6 +43,8 @@ struct Q_DECL_HIDDEN KisStrokesQueue::Private {
int openedStrokesCounter;
bool needsExclusiveAccess;
bool wrapAroundModeSupported;
bool currentStrokeLoaded;
bool lodNNeedsSynchronization;
int desiredLevelOfDetail;
int nextDesiredLevelOfDetail;
......@@ -510,18 +513,32 @@ bool KisStrokesQueue::checkStrokeState(bool hasStrokeJobsRunning,
* jobs present.
*/
if(!stroke->isInitialized() && hasJobs && hasLodCompatibility) {
KIS_SAFE_ASSERT_RECOVER_NOOP(!m_d->currentStrokeLoaded);
m_d->needsExclusiveAccess = stroke->isExclusive();
m_d->wrapAroundModeSupported = stroke->supportsWrapAroundMode();
m_d->currentStrokeLoaded = true;
result = true;
}
else if(hasJobs && hasLodCompatibility) {
/**
* If the stroke has no initialization phase, then it can
* arrive here unloaded.
*/
if (!m_d->currentStrokeLoaded) {
m_d->needsExclusiveAccess = stroke->isExclusive();
m_d->wrapAroundModeSupported = stroke->supportsWrapAroundMode();
m_d->currentStrokeLoaded = true;
}
result = true;
}
else if(stroke->isEnded() && !hasJobs && !hasStrokeJobsRunning) {
m_d->strokesQueue.dequeue(); // deleted by shared pointer
m_d->needsExclusiveAccess = false;
m_d->wrapAroundModeSupported = false;
m_d->currentStrokeLoaded = false;
m_d->switchDesiredLevelOfDetail(false);
......
......@@ -351,7 +351,7 @@ void KisLayerManager::convertNodeToPaintLayer(KisNodeSP source)
KisLayer *srcLayer = dynamic_cast<KisLayer*>(source.data());
if (srcLayer && (srcLayer->inherits("KisGroupLayer") || srcLayer->layerStyle())) {
if (srcLayer && (srcLayer->inherits("KisGroupLayer") || srcLayer->layerStyle() || srcLayer->childCount() > 0)) {
image->flattenLayer(srcLayer);
return;
}
......
......@@ -139,26 +139,39 @@ KisScratchPad::~KisScratchPad() {
delete m_nodeListener;
}
KisScratchPad::Mode KisScratchPad::modeFromButton(Qt::MouseButton button) const
{
return
button == Qt::NoButton ? HOVERING :
button == Qt::MidButton ? PANNING :
button == Qt::RightButton ? PICKING :
PAINTING;
}
void KisScratchPad::pointerPress(KoPointerEvent *event)
{
if (event->button() == Qt::LeftButton) {
m_toolMode = PAINTING;
if (m_toolMode != HOVERING) return;
m_toolMode = modeFromButton(event->button());
if (m_toolMode == PAINTING) {
beginStroke(event);
event->accept();
}
else if (event->button() == Qt::MidButton) {
m_toolMode = PANNING;
else if (m_toolMode == PANNING) {
beginPan(event);
event->accept();
}
else if (event->button() == Qt::RightButton) {
m_toolMode = PICKING;
else if (m_toolMode == PICKING) {
pick(event);
event->accept();
}
}
void KisScratchPad::pointerRelease(KoPointerEvent *event)
{
if (modeFromButton(event->button()) != m_toolMode) return;
if (m_toolMode == PAINTING) {
endStroke(event);
m_toolMode = HOVERING;
......@@ -339,6 +352,8 @@ void KisScratchPad::setupScratchPad(KisCanvasResourceProvider* resourceProvider,
connect(m_resourceProvider, SIGNAL(sigOnScreenResolutionChanged(qreal,qreal)),
SLOT(setOnScreenResolution(qreal,qreal)));
connect(this, SIGNAL(colorSelected(const KoColor&)),
m_resourceProvider, SLOT(slotSetFGColor(const KoColor&)));
m_defaultColor = KoColor(defaultColor, KoColorSpaceRegistry::instance()->rgb8());
......
......@@ -137,6 +137,10 @@ private:
PICKING
};
Mode modeFromButton(Qt::MouseButton button) const;
private:
KoColor m_defaultColor;
Mode m_toolMode;
KisPaintLayerSP m_paintLayer;
......
:: This batch script is meant to prepare a Krita package folder to be zipped or
:: to be a base for the installer.
::
:: Just drop it next to the "i" install folder where the dependencies and Krita binaries are.
::
:: TODO: Ask if the user want to make an archive and with which tool
:: TODO: Maybe ask for a custom install folder name?
set ZIP="c:\Program Files\7-Zip"
set MINGW_GCC_BIN=c:\TDM-GCC-64\bin\
set BUILDROOT=%CD%
set BUILDDIR_INSTALL=%BUILDROOT%\i
set PATH=%MINGW_GCC_BIN%;%PATH%
@echo off
if not exist %BUILDDIR_INSTALL% (
echo Cannot find the install folder!
pause
exit /B
)
set /P pkg_root=Insert krita package name:
if [%pkg_root%] == [] (
echo You entered an empty name!
pause
exit /B
)
:: Initial folder setup
mkdir %pkg_root%
mkdir %pkg_root%\bin
mkdir %pkg_root%\lib
mkdir %pkg_root%\share
:: Bin folder
copy %MINGW_GCC_BIN%\lib*.dll %pkg_root%\bin
copy %BUILDDIR_INSTALL%\bin\krita.exe %pkg_root%\bin
copy %BUILDDIR_INSTALL%\bin\*.dll %pkg_root%\bin
copy %BUILDDIR_INSTALL%\lib\*.dll %pkg_root%\bin
xcopy /S /Y /I %BUILDDIR_INSTALL%\plugins\imageformats %pkg_root%\bin\imageformats
xcopy /S /Y /I %BUILDDIR_INSTALL%\plugins\kf5 %pkg_root%\bin\kf5
xcopy /S /Y /I %BUILDDIR_INSTALL%\plugins\platforms\qwindows.dll %pkg_root%\bin\platforms\
xcopy /S /Y /I %BUILDDIR_INSTALL%\plugins\printsupport %pkg_root%\bin\printsupport
xcopy /Y %BUILDDIR_INSTALL%\plugins\iconengines\*.dll %pkg_root%\bin\iconengines\
:: Translations
mkdir %pkg_root%\bin\translations
copy %BUILDDIR_INSTALL%\translations\qt_ca.qm %pkg_root%\bin\translations\qt_ca.qm
copy %BUILDDIR_INSTALL%\translations\qt_cs.qm %pkg_root%\bin\translations\qt_cs.qm
copy %BUILDDIR_INSTALL%\translations\qt_de.qm %pkg_root%\bin\translations\qt_de.qm
copy %BUILDDIR_INSTALL%\translations\qt_en.qm %pkg_root%\bin\translations\qt_en.qm
copy %BUILDDIR_INSTALL%\translations\qt_fi.qm %pkg_root%\bin\translations\qt_fi.qm
copy %BUILDDIR_INSTALL%\translations\qt_he.qm %pkg_root%\bin\translations\qt_hu.qm
copy %BUILDDIR_INSTALL%\translations\qt_it.qm %pkg_root%\bin\translations\qt_it.qm
copy %BUILDDIR_INSTALL%\translations\qt_ja.qm %pkg_root%\bin\translations\qt_ja.qm
copy %BUILDDIR_INSTALL%\translations\qt_ko.qm %pkg_root%\bin\translations\qt_ko.qm
copy %BUILDDIR_INSTALL%\translations\qt_lv.qm %pkg_root%\bin\translations\qt_lv.qm
copy %BUILDDIR_INSTALL%\translations\qt_ru.qm %pkg_root%\bin\translations\qt_ru.qm
copy %BUILDDIR_INSTALL%\translations\qt_sk.qm %pkg_root%\bin\translations\qt_sk.qm
copy %BUILDDIR_INSTALL%\translations\qt_uk.qm %pkg_root%\bin\translations\qt_uk.qm
copy %BUILDDIR_INSTALL%\translations\qt_fr.qm %pkg_root%\bin\translations\qt_fr.qm
:: Lib
xcopy /Y %BUILDDIR_INSTALL%\lib\kritaplugins\*.dll %pkg_root%\lib\kritaplugins\
strip %pkg_root%\lib\kritaplugins\*.dll
:: Share
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\appdata %pkg_root%\share\appdata
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\applications %pkg_root%\share\applications
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\color %pkg_root%\share\color
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\color-schemes %pkg_root%\share\color-schemes
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\doc %pkg_root%\share\doc
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\icons %pkg_root%\share\icons
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kf5 %pkg_root%\share\kf5
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\krita %pkg_root%\share\krita
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kritaplugins %pkg_root%\share\kritaplugins
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\kservices5 %pkg_root%\share\kservices5
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\locale %pkg_root%\share\locale
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\man %pkg_root%\share\man
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\mime %pkg_root%\share\mime
xcopy /Y /S /I %BUILDDIR_INSTALL%\share\ocio %pkg_root%\share\ocio
::Link
copy %BUILDROOT%\krita\packaging\windows\krita.lnk %pkg_root%
%BUILDDIR_INSTALL%\bin\windeployqt.exe %pkg_root%\bin\krita.exe
:: Debug build
%ZIP%\7z.exe a -tzip %pkg_root%-dbg.zip %pkg_root%
:: Bin folder
strip %pkg_root%\bin\krita.exe
strip %pkg_root%\bin\*.dll
strip %pkg_root%\bin\imageformats\*.dll
strip %pkg_root%\bin\kf5\*.dll
strip %pkg_root%\bin\kf5\org.kde.kwindowsystem.platforms\*.dll
strip %pkg_root%\bin\platforms\*.dll
strip %pkg_root%\bin\iconengines\*.dll
%ZIP%\7z.exe a -tzip %pkg_root%.zip %pkg_root%
......@@ -300,6 +300,8 @@ void KisBrushSelectionWidget::setPrecisionEnabled(bool value)
void KisBrushSelectionWidget::setCurrentWidget(QWidget* widget)
{
if (widget == m_currentBrushWidget) return;
if (m_currentBrushWidget) {
m_layout->removeWidget(m_currentBrushWidget);
m_currentBrushWidget->setParent(this);
......@@ -369,4 +371,4 @@ void KisBrushSelectionWidget::setDeltaValue(double value)
}
#include "moc_kis_brush_selection_widget.cpp"
\ No newline at end of file
#include "moc_kis_brush_selection_widget.cpp"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment