Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
67bc95ae
Commit
67bc95ae
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
reduce number of calls to scene refresh
parent
35b80f7d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gui/src/gl_canvas.cc
+8
-3
8 additions, 3 deletions
modules/gui/src/gl_canvas.cc
modules/gui/src/tools/selection_tool.cc
+2
-1
2 additions, 1 deletion
modules/gui/src/tools/selection_tool.cc
with
10 additions
and
4 deletions
modules/gui/src/gl_canvas.cc
+
8
−
3
View file @
67bc95ae
...
...
@@ -134,6 +134,9 @@ MouseEvent::Buttons GLCanvas::TranslateButtons(Qt::MouseButtons buttons) const
void
GLCanvas
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
if
(
!
(
show_beacon_
||
event
->
buttons
()))
{
return
;
}
if
(
this
->
IsToolEvent
(
event
))
{
if
(
ToolManager
::
Instance
().
GetActiveTool
())
{
MouseEvent
mouse_event
(
this
->
TranslateButtons
(
event
->
buttons
()),
...
...
@@ -163,7 +166,7 @@ void GLCanvas::mousePressEvent(QMouseEvent* event)
this
->
HandleMousePressEvent
(
event
);
}
last_pos_
=
QPoint
(
event
->
x
(),
event
->
y
());
this
->
DoRefresh
();
this
->
DoRefresh
();
}
void
GLCanvas
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
...
...
@@ -181,7 +184,7 @@ void GLCanvas::mouseReleaseEvent(QMouseEvent* event)
}
}
last_pos_
=
QPoint
(
event
->
x
(),
event
->
y
());
this
->
DoRefresh
();
this
->
DoRefresh
();
}
void
GLCanvas
::
mouseDoubleClickEvent
(
QMouseEvent
*
event
)
...
...
@@ -203,7 +206,9 @@ void GLCanvas::mouseDoubleClickEvent(QMouseEvent* event)
scene
.
SetCenter
(
atom
.
GetPos
());
}
}
this
->
DoRefresh
();
if
(
show_beacon_
)
{
this
->
DoRefresh
();
}
}
void
GLCanvas
::
RequestContextMenu
(
const
QPoint
&
pos
)
...
...
This diff is collapsed.
Click to expand it.
modules/gui/src/tools/selection_tool.cc
+
2
−
1
View file @
67bc95ae
...
...
@@ -55,7 +55,8 @@ void SelectionTool::Click(const MouseEvent& event)
int
sel_mode
=
this
->
GetSelectionMode
();
gfx
::
Scene
&
scene
=
gfx
::
Scene
::
Instance
();
scene
.
SetSelectionMode
(
sel_mode
);
scene
.
Pick
(
event
.
GetPos
().
x
(),
scene
.
GetViewport
().
height
-
event
.
GetPos
().
y
(),
8
);
scene
.
Pick
(
event
.
GetPos
().
x
(),
scene
.
GetViewport
().
height
-
event
.
GetPos
().
y
(),
8
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment