Also a minor improvement for the postion of the cursor when hiting TAB.
PyConsole.h \
PyConsole_Console.h \
PyConsole_Editor.h \
- PyConsole_Interp.h
+ PyConsole_EnhEditor.h \
+ PyConsole_EnhInterp.h \
+ PyConsole_Event.h \
+ PyConsole_Request.h \
+ PyConsole_Interp.h
dist_libPyConsole_la_SOURCES = \
PyConsole_Console.cxx \
PyConsole_Editor.cxx \
- PyConsole_Interp.cxx
+ PyConsole_EnhEditor.cxx \
+ PyConsole_Event.cxx \
+ PyConsole_Request.cxx \
+ PyConsole_Interp.cxx \
+ PyConsole_EnhInterp.cxx
MOC_FILES = \
PyConsole_Editor_moc.cxx \
+ PyConsole_EnhEditor_moc.cxx \
PyConsole_Console_moc.cxx
nodist_libPyConsole_la_SOURCES = $(MOC_FILES)
PyConsole_msg_fr.qm
libPyConsole_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) \
- -I$(srcdir)/../PyInterp -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
+ -I$(srcdir)/../PyInterp -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../Event
libPyConsole_la_LDFLAGS = $(PYTHON_LIBS) $(QT_MT_LIBS) $(KERNEL_LDFLAGS) -lSALOMELocalTrace
-libPyConsole_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la ../PyInterp/libPyInterp.la
+libPyConsole_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la ../Event/libEvent.la ../PyInterp/libPyInterp.la
clearCompletion();
_cursor_pos = -1;
}
- PyConsole_Editor::keyPressEvent(event);
+ // Discard ctrl pressed alone:
+ if (event->key() != Qt::Key_Control)
+ PyConsole_Editor::keyPressEvent(event);
}
}
QTextBlockFormat bf;
QTextCharFormat cf;
PyConsole_EnhInterp * interp = static_cast<PyConsole_EnhInterp *>(myInterp);
+ int cursorPos;
switch( event->type() )
{
}
// Print all matching completion in a "undo-able" block
+ cursorPos = cursor.position();
cursor.insertBlock();
cursor.beginEditBlock();
formatCompletion(matches, comple_text);
cursor.insertText(comple_text);
cursor.endEditBlock();
+
+ // Position cursor where it was before inserting the completion list:
+ cursor.setPosition(cursorPos);
+ setTextCursor(cursor);
}
break;
case PyInterp_Event::ES_TAB_COMPLETE_ERR:
salomeinclude_HEADERS = \
PyInterp.h \
PyInterp_Interp.h \
+ PyInterp_Event.h \
+ PyInterp_Request.h \
PyInterp_Dispatcher.h
dist_libPyInterp_la_SOURCES = \
PyInterp_Interp.cxx \
+ PyInterp_Event.cxx \
+ PyInterp_Request.cxx \
PyInterp_Dispatcher.cxx
MOC_FILES = PyInterp_Watcher_moc.cxx
-I$(srcdir)/../../Plot2d -I$(srcdir)/../../OCCViewer \
-I$(srcdir)/../../CAM -I$(srcdir)/../../STD \
-I$(srcdir)/../../SUITApp \
- -I$(srcdir)/../../CAM -I$(srcdir)/../../STD
+ -I$(srcdir)/../../CAM -I$(srcdir)/../../STD -I$(srcdir)/../../Event
if GUI_ENABLE_CORBA
libSalomePyQtGUILight_la_CPPFLAGS += -I$(srcdir)/../../SalomeApp \