From 69585cf98f8367e47c4db06c7431820c88778b38 Mon Sep 17 00:00:00 2001 From: andreas <andreas@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Mon, 5 Apr 2010 14:25:35 +0000 Subject: [PATCH] fixed issue BZDNG-26 in new shell branch git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/branches/new_shell@1920 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/gui/src/CMakeLists.txt | 1 + modules/gui/src/data_viewer/pointlist_overlay_base.hh | 2 +- modules/gui/src/python_shell/python_shell_widget.cc | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/gui/src/CMakeLists.txt b/modules/gui/src/CMakeLists.txt index fe8963e68..9654f9db1 100644 --- a/modules/gui/src/CMakeLists.txt +++ b/modules/gui/src/CMakeLists.txt @@ -325,6 +325,7 @@ plot_viewer/plot_legend_panel.hh python_shell/main_thread_runner.hh python_shell/completer_base.hh python_shell/gutter.hh +python_shell/output_redirector.hh python_shell/path_completer.hh python_shell/python_completer.hh python_shell/python_interpreter.hh diff --git a/modules/gui/src/data_viewer/pointlist_overlay_base.hh b/modules/gui/src/data_viewer/pointlist_overlay_base.hh index dc8b3da07..606c859a1 100644 --- a/modules/gui/src/data_viewer/pointlist_overlay_base.hh +++ b/modules/gui/src/data_viewer/pointlist_overlay_base.hh @@ -72,7 +72,7 @@ class DLLEXPORT_OST_GUI PointlistOverlayBaseSettings: public QDialog QPushButton* passive_color_b_; }; -class DLLEXPORT PointlistOverlayBase: public Overlay +class DLLEXPORT_OST_GUI PointlistOverlayBase: public Overlay { Q_OBJECT; public: diff --git a/modules/gui/src/python_shell/python_shell_widget.cc b/modules/gui/src/python_shell/python_shell_widget.cc index 2446daa93..a46b73403 100644 --- a/modules/gui/src/python_shell/python_shell_widget.cc +++ b/modules/gui/src/python_shell/python_shell_widget.cc @@ -502,12 +502,11 @@ void PythonShellWidget::Complete(bool inline_completion) bool PythonShellWidget::handle_custom_commands_(QKeyEvent* event) { - /* deactivated until fix found if ((event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier)) && event->key() == Qt::Key_H) { set_output_visible_(!output_visible_); return true; - }*/ + } if ((event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier)) && event->key() == Qt::Key_W) { @@ -673,8 +672,12 @@ void PythonShellWidget::set_output_visible_(bool flag) for (QTextBlock i=document()->begin(); i!=document()->end(); i=i.next()) { if(i.userState()==BLOCKTYPE_ERROR || i.userState()==BLOCKTYPE_OUTPUT){ i.setVisible(flag); + i.setLineCount(flag ? qMax(1, i.layout()->lineCount()) : 0); } } + dynamic_cast<PythonShellTextDocumentLayout*>(document()->documentLayout())->requestUpdate(); + dynamic_cast<PythonShellTextDocumentLayout*>(document()->documentLayout())->EmitSizeChange(); + ensureCursorVisible(); repaint(); gutter_->update(); viewport()->update(); -- GitLab