mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-28 11:50:53 +00:00
Fixed: Crash the ovqt in ps editor.
This commit is contained in:
parent
2011120cb2
commit
e5e694bc95
2 changed files with 7 additions and 4 deletions
|
@ -153,7 +153,7 @@ sint main(int argc, char **argv)
|
|||
#if !defined(NL_OS_MAC)
|
||||
pluginPaths << settings->value("PluginPath", "./plugins").toString();
|
||||
#else
|
||||
pluginPaths << qApp->applicationDirPath() + QString("/../PlugIns/ovqt");
|
||||
pluginPaths << settings->value("PluginPath", qApp->applicationDirPath() + QString("/../PlugIns/ovqt")).toString();
|
||||
#endif
|
||||
|
||||
pluginManager.setPluginPaths(pluginPaths);
|
||||
|
|
|
@ -222,24 +222,27 @@ void CParticleWorkspaceDialog::touchPSState(CParticleTreeItem *item)
|
|||
|
||||
void CParticleWorkspaceDialog::clickedItem(const QModelIndex & index)
|
||||
{
|
||||
if (_currentItem != NULL)
|
||||
if (_currentItem != 0)
|
||||
_treeModel->getOwnerNode(_currentItem)->getPSPointer()->setCurrentEditedElement(NULL);
|
||||
|
||||
_currentItem = static_cast<CParticleTreeItem *>(index.internalPointer());
|
||||
|
||||
if (_currentItem == 0)
|
||||
return;
|
||||
|
||||
if (index.flags() != Qt::NoItemFlags)
|
||||
_PropertyDialog->setCurrentEditedElement(_currentItem);
|
||||
|
||||
if ((_currentItem->itemType() == ItemType::Workspace) ||
|
||||
(_currentItem->itemType() == ItemType::ParticleSystemNotLoaded))
|
||||
_currentItem = NULL;
|
||||
_currentItem = 0;
|
||||
}
|
||||
|
||||
void CParticleWorkspaceDialog::customContextMenu()
|
||||
{
|
||||
if (!Modules::psEdit().getParticleWorkspace()) return;
|
||||
clickedItem(_ui.treeView->currentIndex());
|
||||
if (_currentItem == NULL) return;
|
||||
if (_currentItem == 0) return;
|
||||
QMenu *popurMenu = new QMenu(this);
|
||||
switch (_currentItem->itemType())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue