mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Fix pie menu appearing in selection mode
This commit is contained in:
parent
fdd0e25a60
commit
1ee870be38
3 changed files with 13 additions and 1 deletions
|
@ -941,8 +941,9 @@ void Application::mousePressEvent(QMouseEvent* event) {
|
|||
_mouseVoxelDragging = _mouseVoxel;
|
||||
_mousePressed = true;
|
||||
|
||||
maybeEditVoxelUnderCursor();
|
||||
|
||||
if (!maybeEditVoxelUnderCursor()) {
|
||||
if (!_palette.isActive()) {
|
||||
_pieMenu.mousePressEvent(_mouseX, _mouseY);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,3 +77,12 @@ void ToolsPalette::render(int screenWidth, int screenHeight) {
|
|||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
bool ToolsPalette::isActive() {
|
||||
for (unsigned int i = 0; i < _tools.size(); ++i) {
|
||||
if (_tools[i]->isActive()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public:
|
|||
void addTool(Tool* tool);
|
||||
void render(int screenWidth, int screenHeight);
|
||||
|
||||
bool isActive();
|
||||
|
||||
private:
|
||||
QImage _textureImage;
|
||||
GLuint _textureID;
|
||||
|
|
Loading…
Reference in a new issue