diff --git a/Dialogs.rc b/Dialogs.rc index 2f4904e..2f06970 100644 --- a/Dialogs.rc +++ b/Dialogs.rc @@ -40,4 +40,12 @@ FONT 8, "Ms Shell Dlg" // Icon resources // LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN -IDI_ICON1 ICON "FatB3dIcon.ico" \ No newline at end of file +IDI_ICON1 ICON "FatB3dIcon.ico" + + + +// +// Manifest resources +// +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +2 RT_MANIFEST ".\\manifest.xml" diff --git a/Manifest.xml b/Manifest.xml index e69de29..618fb8e 100644 --- a/Manifest.xml +++ b/Manifest.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/source/Application.cpp b/src/source/Application.cpp index 19f0706..2a9de34 100644 --- a/src/source/Application.cpp +++ b/src/source/Application.cpp @@ -175,7 +175,7 @@ void Application::deleteInstance() } } if(g_selectedInstances.size() == 0) - g_usableApp->_propWindow->ClearProperties(); + g_usableApp->_propWindow->UpdateSelected(g_dataModel); } @@ -331,12 +331,25 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) { else _dataModel->getEngine()->createBody(partInstance); } + bool a = false; while(toDelete.size() > 0) { PartInstance * p = toDelete.back(); toDelete.pop_back(); + if(std::find(g_selectedInstances.begin(), g_selectedInstances.end(), p) != g_selectedInstances.end()) + { + g_selectedInstances.erase(std::remove(g_selectedInstances.begin(), g_selectedInstances.end(), p), g_selectedInstances.end()); + a = true; + } p->setParent(NULL); delete p; + } + if(a) + { + if(g_selectedInstances.size() == 0) + g_usableApp->_propWindow->UpdateSelected(g_dataModel); + else if(g_selectedInstances.size() == 1) + g_usableApp->_propWindow->UpdateSelected(g_selectedInstances[0]); } for(int i = 0; i < 6; i++) { diff --git a/src/source/Globals.cpp b/src/source/Globals.cpp index fab75c8..ce771d7 100644 --- a/src/source/Globals.cpp +++ b/src/source/Globals.cpp @@ -1,10 +1,6 @@ #include "Globals.h" #include "Application.h" -int const Globals::gen = 0; -int const Globals::major = 0; -int const Globals::minor = 105; -int const Globals::patch = 0; int Globals::surfaceId = 2; //bool Globals::showMouse = true; bool Globals::useMousePoint = false; diff --git a/src/source/PropertyWindow.cpp b/src/source/PropertyWindow.cpp index 39e67a8..bf72075 100644 --- a/src/source/PropertyWindow.cpp +++ b/src/source/PropertyWindow.cpp @@ -342,7 +342,7 @@ void PropertyWindow::UpdateSelected(Instance * instance) { PropGrid_ResetContent(_propGrid); prop = instance->getProperties(); - if (selectedInstance != instance) + //if (selectedInstance != instance) { selectedInstance = instance; for(size_t i = 0; i < prop.size(); i++)