Skip to content
Snippets Groups Projects
Commit 174b2753 authored by Marco Biasini's avatar Marco Biasini
Browse files

fix for BZDNG-173

parent 25480491
Branches
Tags
No related merge requests found
...@@ -737,6 +737,14 @@ QTextBlock PythonShellWidget::GetEditStartBlock() ...@@ -737,6 +737,14 @@ QTextBlock PythonShellWidget::GetEditStartBlock()
void PythonShellWidget::keyPressEvent(QKeyEvent* event) void PythonShellWidget::keyPressEvent(QKeyEvent* event)
{ {
// BZDNG-173
if (event->key()==Qt::Key_Left) {
if (this->textCursor().position()==GetEditStartBlock().position() ||
this->textCursor().anchor()==GetEditStartBlock().position()) {
event->accept();
return;
}
}
if (this->handle_custom_commands_(event)){ if (this->handle_custom_commands_(event)){
return; return;
} }
......
...@@ -37,7 +37,7 @@ EditPositionGuard::EditPositionGuard(PythonShellWidget* shell, int flags1, int f ...@@ -37,7 +37,7 @@ EditPositionGuard::EditPositionGuard(PythonShellWidget* shell, int flags1, int f
bool EditPositionGuard::check() bool EditPositionGuard::check()
{ {
return check_flag(flags1_) && check_flag(flags2_); return check_flag(flags1_) && check_flag(flags2_);
} }
bool EditPositionGuard::check_flag(int flags) bool EditPositionGuard::check_flag(int flags)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment