From 0933ba68803919cbb34fac81561892d00cfc1d6d Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sat, 15 Nov 2008 22:58:19 +0000 Subject: [PATCH] cosmetics. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27508 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiWorkArea.cpp | 6 +++--- src/frontends/qt4/GuiWorkArea.h | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 09bf4bb97d..1d02dcf051 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -307,7 +307,7 @@ void GuiWorkArea::init() // Must be set when creating custom text editing widgets. setAttribute(Qt::WA_InputMethodEnabled, true); - dialogMode_ = false; + dialog_mode_ = false; } @@ -872,8 +872,8 @@ void GuiWorkArea::generateSyntheticMouseEvent() void GuiWorkArea::keyPressEvent(QKeyEvent * ev) { - // Do not process here some keys if dialogMode_ is set - if (dialogMode_ + // Do not process here some keys if dialog_mode_ is set + if (dialog_mode_ && (ev->modifiers() == Qt::NoModifier || ev->modifiers() == Qt::ShiftModifier) && (ev->key() == Qt::Key_Escape diff --git a/src/frontends/qt4/GuiWorkArea.h b/src/frontends/qt4/GuiWorkArea.h index 9694977117..4a36dd166d 100644 --- a/src/frontends/qt4/GuiWorkArea.h +++ b/src/frontends/qt4/GuiWorkArea.h @@ -136,15 +136,12 @@ public: /// void resizeBufferView(); - bool isInDialog() { - return dialogMode_; - } + bool inDialogMode() { return dialog_mode_; } + void setDialogMode(bool mode) { dialog_mode_ = mode; } /// GuiCompleter & completer() { return *completer_; } - /// Return true if dialogMode is set - bool& dialogMode() { return dialogMode_; } /// Return the GuiView this workArea belongs to GuiView const & view() const { return *lyx_view_; } @@ -263,7 +260,7 @@ private: /// Special mode in which Esc and Enter (with or without Shift) /// are ignored - bool dialogMode_; + bool dialog_mode_; }; // GuiWorkArea -- 2.39.2