mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:13:09 +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;
|
_mouseVoxelDragging = _mouseVoxel;
|
||||||
_mousePressed = true;
|
_mousePressed = true;
|
||||||
|
|
||||||
|
maybeEditVoxelUnderCursor();
|
||||||
|
|
||||||
if (!maybeEditVoxelUnderCursor()) {
|
if (!_palette.isActive()) {
|
||||||
_pieMenu.mousePressEvent(_mouseX, _mouseY);
|
_pieMenu.mousePressEvent(_mouseX, _mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,3 +77,12 @@ void ToolsPalette::render(int screenWidth, int screenHeight) {
|
||||||
|
|
||||||
glPopMatrix();
|
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 addTool(Tool* tool);
|
||||||
void render(int screenWidth, int screenHeight);
|
void render(int screenWidth, int screenHeight);
|
||||||
|
|
||||||
|
bool isActive();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QImage _textureImage;
|
QImage _textureImage;
|
||||||
GLuint _textureID;
|
GLuint _textureID;
|
||||||
|
|
Loading…
Reference in a new issue