Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Tusooa Zhu
Krita
Commits
1b361a3a
Commit
1b361a3a
authored
Feb 15, 2012
by
Sven Langkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't show outline while in color picker
parent
2e53e25b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
krita/ui/tool/kis_tool.h
krita/ui/tool/kis_tool.h
+1
-0
krita/ui/tool/kis_tool_freehand.cc
krita/ui/tool/kis_tool_freehand.cc
+13
-13
krita/ui/tool/kis_tool_paint.cc
krita/ui/tool/kis_tool_paint.cc
+3
-1
No files found.
krita/ui/tool/kis_tool.h
View file @
1b361a3a
...
...
@@ -200,6 +200,7 @@ protected:
protected:
enum
ToolMode
{
HOVER_MODE
,
SECONDARY_HOVER_MODE
,
PAINT_MODE
,
SECONDARY_PAINT_MODE
,
MIRROR_AXIS_SETUP_MODE
,
...
...
krita/ui/tool/kis_tool_freehand.cc
View file @
1b361a3a
...
...
@@ -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
);
...
...
krita/ui/tool/kis_tool_paint.cc
View file @
1b361a3a
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment