Skip to content

Commit 5551952

Browse files
committed
[Cleanup] Move somes elements to .ui files, improve translations.
LocationConditionDialog: - Combined two separate state table into one; - Only one of "block" or "fluid" group box can be selected, which will enable the "state" table. PredicateDock and MCRPredCondition now will be able to change language automatically. Items tooltips are moved to .ui files. Some QTableView is converted to QTableWidget.
1 parent 9977cfc commit 5551952

30 files changed

+2194
-804
lines changed

CodeEditor.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,14 @@ CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent) {
2323
jsonHighlighter = new JsonHighlighter(this->document());
2424
mcfunctionHighlighter = new MCfunctionHighlighter(this->document(), this);
2525

26-
connect(this,
27-
&CodeEditor::blockCountChanged,
28-
this,
29-
&CodeEditor::updateLineNumberAreaWidth);
30-
connect(this,
31-
&CodeEditor::updateRequest,
32-
this,
33-
&CodeEditor::updateLineNumberArea);
34-
connect(this,
35-
&CodeEditor::cursorPositionChanged,
36-
this,
37-
&CodeEditor::onCursorPositionChanged);
26+
connect(this, &CodeEditor::blockCountChanged,
27+
this, &CodeEditor::updateLineNumberAreaWidth);
28+
connect(this, &CodeEditor::updateRequest,
29+
this, &CodeEditor::updateLineNumberArea);
30+
connect(this, &CodeEditor::cursorPositionChanged,
31+
this, &CodeEditor::onCursorPositionChanged);
32+
connect(qobject_cast<MainWindow*>(window()), &MainWindow::curFileChanged,
33+
this, &CodeEditor::setCurFile);
3834

3935
updateLineNumberAreaWidth(0);
4036
onCursorPositionChanged();

0 commit comments

Comments
 (0)