Crash after full parcing file.

--HG--
branch : develop
This commit is contained in:
dismine 2014-10-27 19:19:59 +02:00
parent 084109488f
commit 601cfa47d6
3 changed files with 11 additions and 0 deletions

View File

@ -1409,6 +1409,7 @@ void MainWindow::Clear()
void MainWindow::FullParseFile()
{
toolOptions->ClearPropertyBrowser();
try
{
SetEnabledGUI(true);

View File

@ -60,6 +60,15 @@ VToolOptionsPropertyBrowser::VToolOptionsPropertyBrowser(QDockWidget *parent)
connect(PropertyModel, &VPropertyModel::onDataChangedByEditor, this, &VToolOptionsPropertyBrowser::userChangedData);
}
//---------------------------------------------------------------------------------------------------------------------
void VToolOptionsPropertyBrowser::ClearPropertyBrowser()
{
PropertyModel->clear();
propertyToId.clear();
idToProperty.clear();
currentItem = nullptr;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolOptionsPropertyBrowser::ShowItemOptions(QGraphicsItem *item)
{

View File

@ -46,6 +46,7 @@ class VToolOptionsPropertyBrowser : public QObject
Q_OBJECT
public:
VToolOptionsPropertyBrowser(QDockWidget *parent);
void ClearPropertyBrowser();
public slots:
void itemClicked(QGraphicsItem *item);
void userChangedData(VPE::VProperty* property);