Salome HOME
Task "Make the size of the selection area even bigger, especially for points"
[modules/shaper.git] / src / Model / Model_Application.cpp
index 24a16b9adc591dabeb538e99cede5adc840288fa..324cefee0cf882997a9d530f08786ae8284faf1c 100644 (file)
@@ -81,7 +81,7 @@ void Model_Application::deleteAllDocuments()
 {
   std::map<int, std::shared_ptr<Model_Document> >::iterator aDoc = myDocs.begin();
   for(; aDoc != myDocs.end(); aDoc++) {
-    if (!aDoc->second->isOpened()) // here is main document was closed before subs and closed subs
+    if (aDoc->second->isOpened()) // here is main document was closed before subs and closed subs
       aDoc->second->close(true);
   }
   myDocs.clear();
@@ -153,7 +153,7 @@ void Model_Application::removeUselessDocuments(
 
 int Model_Application::generateDocumentId()
 {
-  int aResult = myDocs.size();
+  int aResult = int(myDocs.size());
   for(; myDocs.find(aResult) != myDocs.end(); aResult++); // count until the result id is unique
   return aResult;
 }