Fix issue with tape tool not drawing after switching via shortcut.
Fixes #2190.
This commit is contained in:
parent
637bffceb7
commit
f087241d3e
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "tenv.h"
|
#include "tenv.h"
|
||||||
// For Qt translation support
|
// For Qt translation support
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
using namespace ToolUtils;
|
using namespace ToolUtils;
|
||||||
|
|
||||||
|
@ -744,6 +745,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void onActivate() override {
|
void onActivate() override {
|
||||||
|
// enable drawing if we are in a scene viewer
|
||||||
|
QWidget *focusWidget = QApplication::focusWidget();
|
||||||
|
if (focusWidget && QString(focusWidget->metaObject()->className()) == "SceneViewer")
|
||||||
|
m_draw = true;
|
||||||
|
|
||||||
if (!m_firstTime) return;
|
if (!m_firstTime) return;
|
||||||
|
|
||||||
std::wstring s = ::to_wstring(TapeMode.getValue());
|
std::wstring s = ::to_wstring(TapeMode.getValue());
|
||||||
|
|
Loading…
Reference in a new issue