@@ -41,12 +41,6 @@ LRESULT CALLBACK DataViewWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
4141 SetWindowLongPtr (hWnd, 0 , (LONG_PTR)view);
4242 }
4343 if (uMsg >= WM_KEYFIRST && uMsg <= WM_KEYLAST) {
44- if (uMsg == WM_KEYDOWN && wParam == ' W' )
45- if (GetKeyState (VK_CONTROL) & 0x8000 )
46- if (not (GetKeyState (VK_SHIFT) & 0x8000 ))
47- if (not (GetKeyState (VK_MENU) & 0x8000 ))
48- wParam = VK_F4;
49-
5044 HWND parent = (HWND)GetWindowLongPtr (hWnd, GWLP_HWNDPARENT);
5145 if (parent)
5246 return SendMessage (parent, uMsg, wParam, lParam);
@@ -319,13 +313,11 @@ QDmsViewArea::~QDmsViewArea()
319313
320314bool QDmsViewArea::nativeEvent (const QByteArray& eventType, void * message, qintptr* result)
321315{
322- if (auto main_window = MainWindow::TheOne ())
323- {
324- if (auto mdi_area = main_window->m_mdi_area .get ())
325- {
326- MSG* msg = static_cast <MSG*>(message);
327- UInt32 received_message_type = msg->message ;
328- if (received_message_type == WM_QT_ACTIVATENOTIFIERS) {
316+ MSG* msg = static_cast <MSG*>(message);
317+ UInt32 received_message_type = msg->message ;
318+ if (received_message_type == WM_QT_ACTIVATENOTIFIERS)
319+ if (auto main_window = MainWindow::TheOne ())
320+ if (auto mdi_area = main_window->m_mdi_area .get ())
329321 while (true ) {
330322 auto current_active_subwindow = mdi_area->activeSubWindow ();
331323 if (!current_active_subwindow)
@@ -336,9 +328,6 @@ bool QDmsViewArea::nativeEvent(const QByteArray& eventType, void* message, qintp
336328
337329 mdi_area->activateNextSubWindow ();
338330 }
339- }
340- }
341- }
342331 return false ;
343332}
344333
@@ -397,17 +386,6 @@ auto QDmsViewArea::contentsRectInPixelUnits()->QRect {
397386 return QRect (topLeft, botRight);
398387}
399388
400- void QDmsViewArea::keyPressEvent (QKeyEvent* keyEvent) {
401- auto dv = getDataView ();
402- if (!dv)
403- return ;
404-
405- if (keyEvent->key () == Qt::Key_W && keyEvent->modifiers () == Qt::ControlModifier)
406- this ->close ();
407-
408- QMdiSubWindow::keyPressEvent (keyEvent);
409- }
410-
411389void QDmsViewArea::UpdatePosAndSize () {
412390 auto rect = contentsRectInPixelUnits ();
413391
0 commit comments