Commit 1b361a3a authored by Sven Langkamp's avatar Sven Langkamp

don't show outline while in color picker

parent 2e53e25b
......@@ -200,6 +200,7 @@ protected:
protected:
enum ToolMode {
HOVER_MODE,
SECONDARY_HOVER_MODE,
PAINT_MODE,
SECONDARY_PAINT_MODE,
MIRROR_AXIS_SETUP_MODE,
......
......@@ -292,6 +292,7 @@ void KisToolFreehand::keyPressEvent(QKeyEvent *event)
{
if (mode() != KisTool::PAINT_MODE) {
KisToolPaint::keyPressEvent(event);
updateOutlineRect();
return;
}
......@@ -405,18 +406,6 @@ void KisToolFreehand::paint(QPainter& gc, const KoViewConverter &converter)
#endif
{
KisPaintOpSettings::OutlineMode outlineMode;
outlineMode = KisPaintOpSettings::CursorIsNotOutline;
if (m_explicitShowOutline ||
mode() == KisTool::GESTURE_MODE ||
(cfg.cursorStyle() == CURSOR_STYLE_OUTLINE &&
(mode() == HOVER_MODE ||
(mode() == PAINT_MODE && cfg.showOutlineWhilePainting())))) {
outlineMode = KisPaintOpSettings::CursorIsOutline;
}
paintToolOutline(&gc,pixelToView(m_currentOutline));
}
}
......@@ -489,7 +478,18 @@ void KisToolFreehand::decreaseBrushSize()
void KisToolFreehand::updateOutlineRect()
{
m_currentOutline = getOutlinePath(m_outlineDocPoint, KisPaintOpSettings::CursorIsOutline);
KisConfig cfg;
KisPaintOpSettings::OutlineMode outlineMode;
outlineMode = KisPaintOpSettings::CursorIsNotOutline;
if (m_explicitShowOutline ||
mode() == KisTool::GESTURE_MODE ||
(cfg.cursorStyle() == CURSOR_STYLE_OUTLINE &&
(mode() == HOVER_MODE ||
(mode() == PAINT_MODE && cfg.showOutlineWhilePainting())))) {
outlineMode = KisPaintOpSettings::CursorIsOutline;
}
m_currentOutline = getOutlinePath(m_outlineDocPoint, outlineMode);
QRectF outlinePixelRect = m_currentOutline.boundingRect();
QRectF outlineDocRect = currentImage()->pixelToDocument(outlinePixelRect);
......
......@@ -170,7 +170,7 @@ void KisToolPaint::mousePressEvent(KoPointerEvent *event)
useCursor(KisCursor::crossCursor());
canvas()->resourceManager()->setResource(KisCanvasResourceProvider::MirrorAxisCenter, convertToPixelCoord(event->point));
}
else if(mode() == KisTool::HOVER_MODE &&
else if(mode() == KisTool::SECONDARY_HOVER_MODE &&
(event->button() == Qt::LeftButton || event->button() == Qt::RightButton) &&
event->modifiers() & Qt::ControlModifier &&
!specialModifierActive()) {
......@@ -227,6 +227,7 @@ void KisToolPaint::keyPressEvent(QKeyEvent *event)
{
if ((event->key() == Qt::Key_Control) && (event->modifiers() == Qt::ControlModifier)) {
useCursor(KisCursor::pickerCursor());
setMode(KisTool::SECONDARY_HOVER_MODE);
} else if ((event->key() == Qt::Key_Control || event->key() == Qt::Key_Shift)) {
if (event->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) {
useCursor(KisCursor::crossCursor());
......@@ -239,6 +240,7 @@ void KisToolPaint::keyReleaseEvent(QKeyEvent* event)
{
if (mode() != KisTool::PAINT_MODE){
resetCursorStyle();
setMode(KisTool::HOVER_MODE);
}
KisTool::keyReleaseEvent(event);
}
......
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