Skip to content

Commit efebdcd

Browse files
Merge pull request #3 from LIHPC-Computational-Geometry/dev-6.3.3
Version 6.3.3. Python 2 console fixes: history management with the up…
2 parents 0d76a03 + bda7b12 commit efebdcd

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

cmake/version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# Pour la bibliothèque QtPython :
66
set (QT_PYTHON_MAJOR_VERSION "6")
77
set (QT_PYTHON_MINOR_VERSION "3")
8-
set (QT_PYTHON_RELEASE_VERSION "2")
8+
set (QT_PYTHON_RELEASE_VERSION "3")
99
set (QT_PYTHON_VERSION ${QT_PYTHON_MAJOR_VERSION}.${QT_PYTHON_MINOR_VERSION}.${QT_PYTHON_RELEASE_VERSION})
1010

1111
# Pour la bibliothèque QtPython3 :
1212
set (QT_PYTHON_3_MAJOR_VERSION "6")
1313
set (QT_PYTHON_3_MINOR_VERSION "3")
14-
set (QT_PYTHON_3_RELEASE_VERSION "2")
14+
set (QT_PYTHON_3_RELEASE_VERSION "3")
1515
set (QT_PYTHON_3_VERSION ${QT_PYTHON_3_MAJOR_VERSION}.${QT_PYTHON_3_MINOR_VERSION}.${QT_PYTHON_3_RELEASE_VERSION})
1616

src/QtPython/QtPythonConsole.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,10 @@ bool QtPythonConsole::Instruction::isRunnable (const string& instruction)
313313
// LA CLASSE QtPythonConsole::QtScriptTextFormat
314314
// ============================================================================
315315

316-
317-
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT);
316+
// v 6.3.3 : on annule commentFormat, la colorisation QtPythonSyntaxHighlighter et il semble qu'il y ait un bogue (les commandes sont bleues dans certains cas
317+
// pour une raison non élucidée), mais où ???
318+
//const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::COMMENT); // v 6.3.3
319+
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::commentFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION); // v 6.3.3
318320
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::emptyLineFormat (QtPythonConsole::QtScriptTextFormat::BLANK);
319321
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::instructionFormat (QtPythonConsole::QtScriptTextFormat::INSTRUCTION);
320322
const QtPythonConsole::QtScriptTextFormat QtPythonConsole::QtScriptTextFormat::ranInstructionFormat (QtPythonConsole::QtScriptTextFormat::RAN_INSTRUCTION);
@@ -1937,6 +1939,7 @@ void QtPythonConsole::addToHistoric (const UTF8String& command, const UTF8String
19371939
if (false == scriptingLog.getComment ( ).empty ( )) // v 2.7.0
19381940
{
19391941
const UTF8String comment (PythonLogOutputStream::toComment (scriptingLog.getComment ( )), Charset::UTF_8);
1942+
const size_t commentLineNum = lineNumber (comment.utf8 ( )); // v 6.3.3
19401943
line += lineNumber (comment.utf8 ( ));
19411944
// cursor.insertText ("# "); // v 3.5.0
19421945
cursor.insertText (UTF8TOQSTRING (comment));
@@ -1945,7 +1948,11 @@ void QtPythonConsole::addToHistoric (const UTF8String& command, const UTF8String
19451948
block = block.next ( );
19461949
cursor.setPosition (block.position ( ), QTextCursor::MoveAnchor);
19471950
setTextCursor (cursor);
1951+
line -= commentLineNum; // v 6.3.3
19481952
} // if (false == scriptingLog.getComment ( ).empty ( ))
1953+
else
1954+
line--; // v 6.3.3
1955+
19491956
if (true == statusErr)
19501957
{
19511958
// line++; // CP 1.11.0

versions.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 6.3.3 : 27/10/23
2+
===============
3+
4+
Correctifs console python 2 :
5+
- gestion de l'historique avec les touches fl�che haut/bas.
6+
- gestion couleur des affichages (parfois en bleu � la place du noir).
7+
8+
19
Version 6.3.2 : 24/10/23
210
===============
311

0 commit comments

Comments
 (0)