Merge pull request #4178 from uLeonis/master

[v0.20][Gui] Consolidate Std view modes
This commit is contained in:
Yorik van Havre
2021-09-09 12:22:27 +02:00
committed by GitHub
10 changed files with 299 additions and 45 deletions

View File

@@ -224,12 +224,25 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node)
// holding the mouse button while using some SoDragger.
// Therefore, we shall ignore ESC while any mouse button is
// pressed, until this Coin bug is fixed.
Gui::TimerFunction* func = new Gui::TimerFunction();
func->setAutoDelete(true);
Gui::Document* doc = Gui::Application::Instance->activeDocument();
func->setFunction(boost::bind(&Document::resetEdit, doc));
QTimer::singleShot(0, func, SLOT(timeout()));
if (!press) {
// react only on key release
// Let first selection mode terminate
Gui::Document* doc = Gui::Application::Instance->activeDocument();
Gui::View3DInventor* view = static_cast<Gui::View3DInventor*>(doc->getActiveView());
if (view)
{
Gui::View3DInventorViewer* viewer = view->getViewer();
if (viewer->isSelecting())
{
return;
}
}
Gui::TimerFunction* func = new Gui::TimerFunction();
func->setAutoDelete(true);
func->setFunction(boost::bind(&Document::resetEdit, doc));
QTimer::singleShot(0, func, SLOT(timeout()));
}
}
else if (press) {
FC_WARN("Please release all mouse buttons before exiting editing");