Force repain to fix paint artifacts on Mac OS X.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-03-10 17:24:16 +02:00
parent 337b247816
commit 5bb90ab92d
3 changed files with 17 additions and 0 deletions

View File

@ -1173,6 +1173,8 @@ void TMainWindow::Remove()
ui->plainTextEditFormula->blockSignals(false); ui->plainTextEditFormula->blockSignals(false);
} }
} }
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1191,6 +1193,7 @@ void TMainWindow::MoveTop()
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->selectRow(0); ui->tableWidget->selectRow(0);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1209,6 +1212,7 @@ void TMainWindow::MoveUp()
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->selectRow(row-1); ui->tableWidget->selectRow(row-1);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1227,6 +1231,7 @@ void TMainWindow::MoveDown()
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->selectRow(row+1); ui->tableWidget->selectRow(row+1);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1245,6 +1250,7 @@ void TMainWindow::MoveBottom()
RefreshData(); RefreshData();
search->RefreshList(ui->lineEditFind->text()); search->RefreshList(ui->lineEditFind->text());
ui->tableWidget->selectRow(ui->tableWidget->rowCount()-1); ui->tableWidget->selectRow(ui->tableWidget->rowCount()-1);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1326,6 +1332,7 @@ void TMainWindow::AddCustom()
ui->actionExportToCSV->setEnabled(true); ui->actionExportToCSV->setEnabled(true);
MeasurementsWasSaved(false); MeasurementsWasSaved(false);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -1383,6 +1390,7 @@ void TMainWindow::AddKnown()
MeasurementsWasSaved(false); MeasurementsWasSaved(false);
} }
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -271,6 +271,7 @@ void DialogFinalMeasurements::Add()
UpdateTree(); UpdateTree();
ui->tableWidget->selectRow(currentRow); ui->tableWidget->selectRow(currentRow);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -295,6 +296,7 @@ void DialogFinalMeasurements::Remove()
{ {
EnableDetails(false); EnableDetails(false);
} }
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -316,6 +318,7 @@ void DialogFinalMeasurements::MoveUp()
UpdateTree(); UpdateTree();
ui->tableWidget->selectRow(row-1); ui->tableWidget->selectRow(row-1);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -337,6 +340,7 @@ void DialogFinalMeasurements::MoveDown()
UpdateTree(); UpdateTree();
ui->tableWidget->selectRow(row+1); ui->tableWidget->selectRow(row+1);
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -855,6 +855,7 @@ void DialogIncrements::AddIncrement()
LocalUpdateTree(); LocalUpdateTree();
table->selectRow(currentRow); table->selectRow(currentRow);
table->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -909,6 +910,8 @@ void DialogIncrements::RemoveIncrement()
{ {
EnableDetails(table, false); EnableDetails(table, false);
} }
table->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -953,6 +956,7 @@ void DialogIncrements::MoveUp()
LocalUpdateTree(); LocalUpdateTree();
table->selectRow(row-1); table->selectRow(row-1);
table->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -997,6 +1001,7 @@ void DialogIncrements::MoveDown()
LocalUpdateTree(); LocalUpdateTree();
table->selectRow(row+1); table->selectRow(row+1);
table->repaint(); // Force repain to fix paint artifacts on Mac OS X
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------