Explorar o código

Selecting entities in the IDE will no longer mark the file as unsaved

Ivan Safrin %!s(int64=10) %!d(string=hai) anos
pai
achega
6769ee4a40

+ 1 - 1
IDE/Contents/Source/PolycodeEditor.cpp

@@ -139,7 +139,7 @@ void PolycodeEditor::handleEvent(Event *event) {
 
 void PolycodeEditor::didAction(String actionName, PolycodeEditorActionData *beforeData, PolycodeEditorActionData *afterData, bool setFileChanged) {
 
-//	printf("DID ACTION (pos: %d): %s\n", currentUndoPosition, actionName.c_str());
+	printf("DID ACTION (pos: %d): %s\n", currentUndoPosition, actionName.c_str());
 	
 	if(setFileChanged) {
 		setHasChanges(true);

+ 1 - 1
IDE/Contents/Source/PolycodeEntityEditor.cpp

@@ -1866,7 +1866,7 @@ void EntityEditorMainView::selectEntity(Entity *targetEntity, bool addToSelectio
         for(int i=0; i < selectedEntities.size(); i++) {
             data->entries.push_back(PolycodeSceneEditorActionDataEntry(selectedEntities[i]));
         }
-        editor->didAction("select", beforeData, data);
+        editor->didAction("select", beforeData, data, false);
         beforeData = NULL;
     }
     

+ 2 - 1
IDE/Contents/Source/PolycodeProps.cpp

@@ -3293,7 +3293,8 @@ void EntitySheet::refreshLayers() {
         SceneEntityInstanceLayer *layer = instance->getLayerAtIndex(i);
         layersProp->comboEntry->addComboItem(layer->name, (void*)layer);
         if(layer->layerID == entity->layerID) {
-            layersProp->comboEntry->setSelectedIndex(i);
+            layersProp->suppressChangeEvent = true;
+            layersProp->set(i);
         }
     }
 }