Program is crashing if open dialog history and change current pattern piece.
--HG-- branch : develop
This commit is contained in:
parent
c6afb63fb7
commit
dd6eb522f8
|
@ -57,7 +57,6 @@ DialogHistory::DialogHistory(VContainer *data, VPattern *doc, QWidget *parent)
|
|||
connect(this, &DialogHistory::ShowHistoryTool, doc, &VPattern::ShowHistoryTool);
|
||||
connect(doc, &VPattern::ChangedCursor, this, &DialogHistory::ChangedCursor);
|
||||
connect(doc, &VPattern::patternChanged, this, &DialogHistory::UpdateHistory);
|
||||
connect(doc, &VPattern::ChangedActivPP, this, &DialogHistory::UpdateHistory);
|
||||
ShowPoint();
|
||||
}
|
||||
|
||||
|
@ -183,7 +182,7 @@ void DialogHistory::FillTable()
|
|||
}
|
||||
}
|
||||
ui->tableWidget->setRowCount(count);//Real row count
|
||||
if (history->size()>0)
|
||||
if (count>0)
|
||||
{
|
||||
cursorRow = currentRow;
|
||||
QTableWidgetItem *item = ui->tableWidget->item(cursorRow, 0);
|
||||
|
|
|
@ -1744,6 +1744,7 @@ void MainWindow::ActionHistory(bool checked)
|
|||
{
|
||||
dialogHistory = new DialogHistory(pattern, doc, this);
|
||||
dialogHistory->setWindowFlags(Qt::Window);
|
||||
connect(this, &MainWindow::RefreshHistory, dialogHistory, &DialogHistory::UpdateHistory);
|
||||
connect(dialogHistory, &DialogHistory::DialogClosed, this, &MainWindow::ClosedActionHistory);
|
||||
dialogHistory->show();
|
||||
}
|
||||
|
@ -2392,6 +2393,7 @@ void MainWindow::ChangePP(int index, bool zoomBestFit)
|
|||
{
|
||||
doc->ChangeActivPP(comboBoxDraws->itemText(index));
|
||||
doc->setCurrentData();
|
||||
emit RefreshHistory();
|
||||
if (drawMode)
|
||||
{
|
||||
ArrowTool();
|
||||
|
|
|
@ -133,6 +133,7 @@ signals:
|
|||
* @param description pattern description.
|
||||
*/
|
||||
void ModelChosen(QVector<VItem*> listDetails, const QString &curFile, const QString &description);
|
||||
void RefreshHistory();
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
|
|
Loading…
Reference in New Issue
Block a user